Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev-lunatic-v2] Usage of LabelType in ConditionFilterType? #73

Open
nsenave opened this issue Oct 7, 2022 · 1 comment
Open

[dev-lunatic-v2] Usage of LabelType in ConditionFilterType? #73

nsenave opened this issue Oct 7, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@nsenave
Copy link
Contributor

nsenave commented Oct 7, 2022

The LabelType has been introduced to replace String labels by an object that contains metadata about the concerned language (VTL / MD). This object is not used in the ConditionFilterType, which seems a bit odd.

I suggest something like this:

https://github.com/InseeFr/Lunatic-Model/blob/dev-lunatic-v2/src/main/resources/xsd/LunaticModelFlat.xsd#L85

    <xs:complexType name="ConditionFilterType">
        <xs:sequence>
            <xs:element name="expression" type="labelType"/>
            <xs:element name="bindingDependencies" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

https://github.com/InseeFr/Lunatic-Model/blob/dev-lunatic-v2/src/main/resources/xsd/LunaticModel.xsd#L92

    <xs:complexType name="ConditionFilterType">
        <xs:sequence>
            <xs:element name="expression" type="labelType"/>
            <xs:element name="bindingDependencies" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

Note:

These changes could also affect the "json-cleaner.xsl" script:

https://github.com/InseeFr/Lunatic-Model/blob/dev-lunatic-v2/src/main/resources/xslt/json-cleaner.xsl

and Eno's branch dev-lunatic-v2

https://github.com/InseeFr/Eno/blob/dev-lunatic-v2/src/main/resources/xslt/transformations/ddi2lunatic-xml/ddi2lunatic-xml-fixed.xsl#L739

@nsenave
Copy link
Contributor Author

nsenave commented Jul 27, 2023

The changes from #101 have been reverted, I'll leave it like this for now.

As it is, the ConditionFilterType is somewhat a particular LabelType (it is a label that has binding dependencies in it).

We will remove the ConditionFilterType entirely, and simply replace it with LabelType, when binding dependencies will no longer be used in the condition filter properties in Lunatic.

@nsenave nsenave added the enhancement New feature or request label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant