xslt.transformations.ddi2lunatic-xml.ddi2lunatic-xml.xsl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eno-core Show documentation
Show all versions of eno-core Show documentation
Eno is a tool that generates survey questionnaires starting from their formal description in DDI
The newest version!
This stylesheet is used to transform a DDI input into an Xforms form (containing orbeon form runner adherences).
The properties file used by the stylesheet.
It's on a transformation level.
A variable is created to build a set of label resources in different languages.
Only the resources in languages already present in the DDI input are charged.
The properties and parameters files are charged as xml trees.
Variables from propertiers and parameters
Characters used to surround variables in conditioned text.
Root template :
The transformation starts with the main Sequence.
This function retrieves the languages to appear in the generated Xforms.
Those languages can be specified in a parameters file on a questionnaire level.
If not, it will get the languages defined in the DDI input.
Function for retrieving instructions based on the location they need to be outputted
Function for retrieving instructions based on the location they need to be outputted
Function for retrieving instructions based on the location they need to be outputted
This function replace [Data](. "example of tooltip") by [Data](. 'example of tooltip')
The goal is to prevent quotes from interfering with VTL
Function: enolunatic:get-cast-variable.
It returns the type of variable, string, number, integer, boolean
variableName -> cast(variableName,type)
Recursive named template: enolunatic:replace-variables-in-formula.
It replaces variables in a all formula (filter, control, personalized text, calculated variable).
"number(if (¤idVariable¤='') then '0' else ¤idVariable¤)" -> ¤idVariable¤
"¤idVariableCalculatedVar¤" -> formula
Recursive named template: enolunatic:resolve-variables-to-collected-and-external-variables.
It searches variables until collected and external in all formula for caculated variables.
The main Sequence activates the higher driver 'Form'.
The 'module' Sequence activates the 'Module' driver.
The 'submodule' Sequence activates the 'SubModule' driver.
The 'group' Sequence activates the 'Group' driver.
The d:ThenConstructReference elements activate the xf-group driver.
The d:ElseConstructReference elements activate the xf-group driver.
"Other – give details" activate the Clarification driver for "give details" in QuestionItem
"Other – give details" activate the Clarification driver for "give details" in QuestionGrid
A StatementItem activates the xf-output driver.
Most Instruction elements activates the xf-output driver.
The "FlowControl" ExternalAid of a Question is the Instruction for a GoTo leaving from the Question, so it activates the GoTo.
The Computation Item activates the control driver
Those DateTimeDomain elements activate the DurationDomain driver.
Those DateTimeDomainReference elements activate the DurationDomain driver.
Those DateTimeDomain elements (not duration) activate the DateTimeDomain driver.
Those DateTimeDomainReference elements (not duration) activate the DateTimeDomain driver.
The NumericDomain element activates the NumericDomain driver.
The NumericDomainReference element activates the NumericDomain driver.
Those TextDomain (250 chars max excluded) activate the TextDomain driver.
Those TextDomain elements (250 chars min) activate the TextareaDomain driver.
Those CodeDomain elements activate the CodeDomaindriver.
The NominalDomain element activates the BooleanDomain driver.
Those Code elements activate the xf-item driver.
Those Code elements activate the xf-item driver.
Those Code elements activate the TextCell driver.
Those Label elements activate the TextCell driver. It is placed at the top left of the Grid.
Those Label elements activate the TextCell driver. It is used as a header for the l:Code of the CodeList.
First dimension from 2-dimensions grid active the TextCell driver even if they don't have Label.
Those GridResponseDomain elements activate the Cell driver.
Those NoDataByDefinition elements which are not linked to a text activate the EmptyCell driver.
Those NoDataByDefinition elements which are linked to a text activate the FixedCell driver.
The QuestionItem elements with a single response and without UserAttributePair activates the SingleResponseQuestion driver.
The QuestionItem elements with a single response and with UserAttributePair activates the PairwiseResponseQuestion driver.
The QuestionItem elements with a StructuredMixedResponseDomain activates the MultipleQuestion driver.
Those d:QuestionGrid aren't fixed, it is possible to add rows, they activate the 'TableLoop' driver.
Those d:QuestionGrid aren't fixed, it is possible to add rows. The d:StructuredMixedGridResponseDomain activate a RowLoop driver to do so.
Those d:QuestionGrid are 'fixed', they activate the Table driver.
The d:QuestionGrid corresponding to MultipleChoiceQuestion
The d:Loop element activates the QuestionLoop driver.
Group of Variable (based on an Instrument or a loop until now)
Variable (collected + calculated + external)
A GenerationInstruction activates the CalculatedVariable driver.
Linking output function enolunatic:get-form-title to input function enoddi:get-label.
Linking output function enolunatic:get-application-name to input function enoddi:get-id.
Linking output function enolunatic:get-form-name to input function enoddi:get-id.
Linking output function enolunatic:get-form-model to input function enoddi:get-form-model.
Linking output function enolunatic:get-name to input function enoddi:get-id.
Linking output function enolunatic:get-external-variables to input function enoddi:get-external-variables.
Linking output function enolunatic:get-relevant to input function enoddi:get-hideable-command.
Linking output function enolunatic:get-readonly to input function enoddi:get-deactivatable-command.
Linking output function enolunatic:get-type to input function enoddi:get-type.
Linking output function enolunatic:get-format to input function enoddi:get-format.
Linking output function enolunatic:get-constraint to input function enoddi:get-control.
Linking output function enolunatic:get-format-constraint to input function enoddi:get-format-constraint.
Linking output function enolunatic:get-alert-level to input function enoddi:get-message-type.
Linking output function enolunatic:get-help to input function enoddi:get-help-instruction.
Linking output function enolunatic:get-label to input function enoddi:get-label.
Linking output function enolunatic:get-value to input function enoddi:get-value.
Linking output function enolunatic:get-appearance to input function enoddi:get-output-format.
Linking output function enolunatic:get-css-class to input function enoddi:get-style.
Linking output function enolunatic:get-length to input function enoddi:get-length.
Linking output function enolunatic:get-minimum to input function enoddi:get-minimum
Linking output function enolunatic:get-maximum to input function enoddi:get-maximum
Linking output function enolunatic:get-number-of-decimals to input function enoddi:get-number-of-decimals
Linking output function enolunatic:get-suffix to input function enoddi:get-suffix.
Linking output function enolunatic:get-header-columns to input function enoddi:get-levels-first-dimension.
Linking output function enolunatic:get-header-lines to input function enoddi:get-levels-second-dimension.
Linking output function enolunatic:get-body-lines to input function enoddi:get-codes-first-dimension.
Linking output function enolunatic:get-header-line to input function enoddi:get-title-line.
Linking output function enolunatic:get-body-line to input function enoddi:get-table-line.
Linking output function enolunatic:get-rowspan to input function enoddi:get-rowspan.
Linking output function enolunatic:get-colspan to input function enoddi:get-colspan.
Linking output function enolunatic:get-minimum-lines to input function enoddi:get-minimum-lines.
Linking output function enolunatic:get-maximum-lines to input function enoddi:get-maximum-lines.
Linking output function enolunatic:get-relevant-dependencies to input function enoddi:get-hideable-then.
Linking output function enolunatic:get-readonly-dependencies to input function enoddi:get-deactivatable-then.
Linking output function enolunatic:get-code-depth to input function enoddi:get-level-number.
Linking output function enolunatic:get-image to input function enoddi:get-image.
Linking output function enolunatic:get-readonly-ancestors to input function enoddi:get-deactivatable-ancestors
Linking output function enolunatic:get-readonly-ancestors-variables to input function enoddi:get-deactivatable-ancestors-variables
Linking output function enolunatic:get-relevant-ancestors to input function enoddi:get-hideable-ancestors
Linking output function enolunatic:get-relevant-ancestors-variables to input function enoddi:get-hideable-ancestors-variables
Linking output function enolunatic:get-label-conditioning-variables to input function enoddi:get-label-conditioning-variables
Linking output function enolunatic:get-conditioning-variable-formula to input function enoddi:get-conditioning-variable-formula
Linking output function enolunatic:get-conditioning-variable-formula-variables to input function enoddi:get-conditioning-variable-formula-variables
Linking output function enolunatic:get-item-label-conditioning-variables to input function enoddi:get-item-label-conditioning-variables
Linking output function enolunatic:get-business-name to input function enoddi:get-business-name
Linking output function enolunatic:get-business-ancestors to input function enoddi:get-business-ancestors
Linking output function enolunatic:get-control-variables to input function enoddi:get-control-variables
Linking output function enolunatic:get-hideable-command-variables to input function enoddi:get-hideable-command-variables
Linking output function enolunatic:get-deactivatable-command-variables to input function enoddi:get-deactivatable-command-variables
Linking output function enolunatic:get-variable-calculation to input function enoddi:get-variable-calculation.
Linking output function enolunatic:get-variable-calculation-variables to input function enoddi:get-variable-calculation-variables.
Linking output function enolunatic:get-before-question-title-instructions to input function enoddi:get-previous-filter-description
Linking output function enolunatic:get-question-name to input function enoddi:get-question-name.
Linking output function enolunatic:get-code-maximum-length to input function enoddi:get-code-maximum-length
Linking output function enolunatic:get-container to input function enoddi:get-container
Linking output function enolunatic:get-check-name to input function enoddi:get-check-name
Linking output function enolunatic:get-codelist-name to input function enoddi:get-codelist-name
Linking output function enolunatic:get-codelist-id to input function enoddi:get-codelist-id
Linking output function enolunatic:is-required to input function enoddi:is-required.
Linking output function enolunatic:get-before-question-title-instructions to input function enoddi:get-before-question-title-instructions.
Linking output function enolunatic:get-generation-instruction to input function enoddi:get-generation-instruction.
:get-minimum-occurrences to input function enoddi:get-minimum-occurrences
:get-minimum-occurrences-variables to input function enoddi:get-minimum-occurrences-variables
:get-maximum-occurrences to input function enoddi:get-maximum-occurrences
:get-maximum-occurrences-variables to input function enoddi:get-maximum-occurrences-variables
Linking output function enolunatic:get-cell-value to input function enoddi:get-cell-value
Linking output function enolunatic:is-linked-loop to input function enoddi:is-linked-loop
Linking output function enolunatic:is-scope-questionconstruct to input function enoddi:is-scope-questionconstruct
Linking output function enolunatic:is-scope-loop to input function enoddi:is-scope-loop
Linking output function enolunatic:get-scope-id to input function enoddi:get-scope-id
Linking output function enolunatic:get-loop-first-descendant-question to input function enoddi:get-loop-first-descendant-question
Linking output function enolunatic:get-pairwise-scope to input function enoddi:get-pairwise-scope
Linking output function enolunatic:get-external-codelist-name to input function enoddi:get-external-codelist-name
Linking output function enolunatic:get-suggester-configuration to input function enoddi:get-suggester-configuration
ResponseDomainInMixed with AttachmentLocation correspond to attached Responsedomain that should'nt be seen as a direct child of the ResponseDomainInMixed but as a direct child of the response field which it's attached to ('other:' usecase)
GridResponseDomainInMixed with AttachmentLocation correspond to attached Responsedomain that should'nt be seen as a direct child of the GridResponseDomainInMixed but as a direct child of the response field which it's attached to ('other:' usecase)
For l:Code with attached ResponseDomain, the attached is a direct child of the l:Code. FIXME : Works only for l:Code, if other case are used, need an extension of the implementation.
For l:Code with attached ResponseDomain, the attached is a direct child of the l:Code. FIXME : Works only for l:Code, if other case are used, need an extension of the implementation.
As in r:OutParameter, all the CodeList could be referenced, it's needed to make the r:OutParameter not a direct child of the CodeDomain to avoid conflict for attached ResponseDomain.
In MultipleChoiceQuestion, only the child of GridResponseDomainInMixed are considered as child (GridDimension and GridResponseDomainInMixed are escaped to prevent Table&Cell drivers).
It deactivate explicit driver flow for Instructions attached to a question. Explicit out-getters should be used instead to retrieve instructions.
Variables become children of the Instrument