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

questionnaire_generated.xml - order should not be relevant #560

Open
christian-fr opened this issue Mar 21, 2023 · 0 comments
Open

questionnaire_generated.xml - order should not be relevant #560

christian-fr opened this issue Mar 21, 2023 · 0 comments
Assignees

Comments

@christian-fr
Copy link
Collaborator

Status quo

When building a project, a file questionnaire_generated.xml is created, containing XML data from one or more files matching the regex:
questionnaire[0-9]*\.xml

We observed different behaviour when reversing that order, e.g. (ex-)changing the filenames e.g.:
questionnaire.xml -> questionnaire1.xml
questionnaire1.xml -> questionnaire.xml

The resulting questionnaire_generated.xml files differ in size and structure.

A difference in XML-structure is to be expected, insofar as the order of the page-tags is determined by the order of declaration within the XML-files.

But structural differences apart from that must not happen. A different filesize is an indicator of larger structural differences.

Analysis

Further inspection revealed, that the only noticeable differences between those files seem to be automatically added attributes and tags.

attributes:

additionalLanguages=""
customLayout="false"

tags:

<zofar:side xsi:nil="true"/>
<zofar:researchdata xsi:nil="true"/>
<zofar:breadcrumb xsi:nil="true"/>
<zofar:triggers xsi:nil="true"/>
<zofar:header xsi:nil="true"/>
<zofar:transitions xsi:nil="true"/>
<zofar:body xsi:nil="true"/>

Example: page "end_0"

When situated in questionnaire.xml, the resulting element in questionnaire_generated.xml looks like this:

    <zofar:page uid="end_0">
        <zofar:body uid="b">
            <zofar:section uid="sc">
                <zofar:body uid="b">
                    <zofar:questionOpen uid="qo" variable="mis200" smallOption="false">
                        <zofar:header>
                            <zofar:question uid="qo1" block="true">#{layout.BREAK}
								#{layout.BREAK}
								Wenn Sie noch Kommentare oder Anregungen haben, können Sie uns diese gerne hier mitteilen:</zofar:question>
                        </zofar:header>
                    </zofar:questionOpen>
                </zofar:body>
            </zofar:section>
        </zofar:body>
        <zofar:transitions>
            <zofar:transition target="end"/>
        </zofar:transitions>
    </zofar:page>

When situated in questionnaire1.xml, the resulting element in questionnaire_generated.xml looks like this:

    <zofar:page uid="end_0" additionalLanguages="" customLayout="false">
        <zofar:header xsi:nil="true"/>
        <zofar:body uid="b">
            <zofar:section uid="sc">
                <zofar:body uid="b">
                    <zofar:questionOpen uid="qo" variable="mis200" smallOption="false">
                        <zofar:header>
                            <zofar:question uid="qo1" block="true">#{layout.BREAK}
								#{layout.BREAK}
								Wenn Sie noch Kommentare oder Anregungen haben, können Sie uns diese gerne hier mitteilen:</zofar:question>
                        </zofar:header>
                    </zofar:questionOpen>
                </zofar:body>
            </zofar:section>
        </zofar:body>
        <zofar:transitions>
            <zofar:transition target="end"/>
        </zofar:transitions>
        <zofar:triggers xsi:nil="true"/>
        <zofar:side xsi:nil="true"/>
        <zofar:researchdata xsi:nil="true"/>
        <zofar:breadcrumb xsi:nil="true"/>
    </zofar:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants