Git Product home page Git Product logo

eno's People

Contributors

davdarras avatar dependabot[bot] avatar fbibonne avatar laurentc35 avatar nsenave avatar orogel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eno's Issues

Redesign the process around the DoubleDuration driver

The usage of this driver is weird and it is not at all generic.
It creates two xforms controls from a unique ResponseDomain.
And it indicates that the select values can only be between 20 and 60 in the output.
The driver is not reusable in that state.

Removing useless comments in the xslt stylesheets.

There are a lot of comments in the xslt stylesheets.
The useless comments must be removed.
In the future, if possible, branches must be used to keep some code that could be used later rather than keeping it in the master branch in comments.

Refactoring the Body//Table and Body//TableLoop templates

The second one was inspired by the first one.
And the first isn't completely compliant with the Eno architecture.

In theory, the Table driver should write some elements, call some functions and continue the process with the children of the input.
Those children will call some other drivers, etc....

When I wrote the functionnality, I could not manage to do that, so I use a function to directly get the elements I needed as children and do the treatment within the Table Driver.
Some functions on the DDI side are a little weird.

It will be an improvement to refactor that part.

Addition of new transformations

Development of XMLPogues to DDI
Integration of XMLPogues to DDI
Development of DDI to XMLPogues
Integration of DDI to XMLPogues

Generation of xsl stylesheets

The xsl stylesheets are currently generated this way :

  • a main xslt stylesheet named '...-fixed.xsl' contains the namespaces that are used by the final generated xsl stylesheet (and complex templates that cannot be generated)
  • one or several xsl stylesheets are generated from fods files, but without namespaces so they cannot be used in that state
  • the final generated stylesheet is built by copying the '...-fixed.xsl' stylesheet and adding it the content of the generated stylesheets (so it contains namespaces and can be used).

Maybe it could be done another way (to be discussed) :

  • a stylesheet containing the complex templates and importing the stylesheets to be generated
  • one or several stylesheets generated from fods files : the namespaces of those stylesheets could be placed in a second spreadsheet of the fods file
    The fods2xsl transformation would be more standalone this way. For the moment it cannot generate a functional stylesheet by itself.

Parametrization layer

Formalize process with XProc or equivalent.
Definition of a parameter file format (XSD / Schematron)

init submission ?

Do we need to create an init submission which will be called in a xforms-ready action to init the instance ?

Mutualise some elements in resource instance in the Xforms output ?

For example, the alert message :
'You shall type an integer number between x and y" is written a lot in the resource instance.
It should be possible to do something approximately like this :

  1. write only once in the resource instance :
    You shall type an integer number between
    and
  2. call the alert message like this in the xforms element :
    <xf:alert value="concat($form-resources/messageA, x, $form-resources/messageB, y)"/>
    Approximately...

Would it really decrease the size of the questionnaire ?
Would it be faster/slower/the same ?

Take into account the work in 'useless' branch.

This branch was used to prevent empty Xforms element to be written in the output (output/fr/models.xsl).
It lightens considerably the generated questionnaire.
If possible, it'll be an improvement if it was taken into account.

Refactoring

Folder reorganization
Enhancement of XSLT import mechanism
Enrichment of in-getter/out-getter mapping

List cases of ill-named drivers

Some drivers are named as if they produced elements of the XForms namespace, whereas in fact they are not. This should be documented.

Example: xf-double-duree.

Moving final template of dereferencing.xsl ?

It is the template on xhtml:a.
It seems to me that it is not correctly placed.
Is it really dereferencing ?
Wouldn't it be more appropriate to :

  • create a driver in some way to write the HTML in models.xsl ?
  • or at least to move it in cleaning.xsl where some templates linked to xhtml:a elements are already present ?

Separate the main instance in two ? And flatten the two instances ?

Is it possible to separate the main instance in two ?

  • some elements are linked to fields and can be filled by end users
  • some elements are linked to fixed texts and will never change
    Only the first type of elements need to be saved.
    The other elements could be put into a second instance.
    Two gains :
  1. only the data that needs to be saved is saved, it will increase the performances
  2. there are less adherences between the form and the data stored in base. If for example we want to change an id element for an unknown reason, it is possible. It's not possible if there is such a mention in base.

And is it possible to flatten the instance ? It will be necessary if we want to remove id sections of the main instance.

Refactoring source-fixed.xsl of DDI

There might be something to do with :

  • the multiple templates with enoddi:get-label mode and the creation of labels from QuestionText, ordinary Instruction, 'format' Instruction and 'tooltip' instruction.
  • the multiple templates with lang-choice mode which are multiplied due the comlpexity described above

It might be impacted by issue #54.
It might help if the labels on the DDI side were harmonized.
Maybe something better or simpler could be done on the produced xhtml.

Make QuestionItem activates xf-output driver.

It is a very good idea of @BulotF.
It does seem a little counter-intuitive since, for example, a QuestionItem with a TextDomain response seems very close to an xf:input field.
But it will allow to delete a lot of templates which will become useless and to simplify a lot of other templates. It will increase the readability of parts of Eno.
It will have a big impact on the produced Xforms.

JavaDoc warnings

5 warnings raised by OSSRH during Eno publication:

  • fr\insee\eno\Constants.java:150: no @param for path (getInputStreamFromPath
  • fr\insee\eno\xsl\FodsToXSLCompiler.java:33: no description for @param args
  • fr\insee\eno\xsl\FodsToXSLCompiler.java:418: no description for @throws Exception
  • fr\insee\eno\xsl\FodsToXSLCompiler.java:524: no description for @throws Exception
  • fr\insee\eno\xsl\FodsToXSLCompiler.java:621: no description for @ThrowsException

Duplicate of lang files ?

Lang conf files are duplicated in both src/lang/fr and src/resources/lang/fr, should keep only one copy of it.

Erasing values when some part becomes readonly

A comment in the code seems to tell that the behaviour should be parametable.
A parameter needs to be created on a questionnaire level (in parameters.xml file) and used in models.xsl to know if the behaviour is wanted or not.

enoddi:get-output-format is Xforms orientated

It should return the values 'radio-button', 'drop-down-list' and 'checkbox' and not the values 'full' and 'minimal'.
The enofr:get-appearance function must not be directly linked to the enoddi:get-output-format.
The values 'full' and 'minimal' must be deduced from enoddi:get-output-format and enoddi:get-type in ddi2fr-fixed.xsl.

Consistency of the enoddi:get-codes-first-dimension getter

The enoddi:get-codes-first-dimension getter doesn't return consistent result between Table and TableLoop driver.
In the first case it's a sequence of <l:Code/> that are returned, on the other it's a sequence of elements (used only to render the number of lines).
In the ddi2fr implementation, the TableLoop driver never use this getter but still it's a bit confusing for new implementation.
This getter should return consistent results from both driver (in the ddi2fr implementation, a dummy sequence is enough as l:Code are never used through this getter, only the number of lines is used).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.