-
Notifications
You must be signed in to change notification settings - Fork 124
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
A preserveOrder= of "false" does nothing #241
Comments
N.B. TEI issue #1970. |
Pinging this ticket -- surely we need to get this fixed? It's currently not possible (as far as I can see) to create a content model which may contain zero or one of each of a list of elements in any order. |
I've recently been bitten by this bug and confirm it's still happening. I've done a bit of digging in the Stylesheets and it looks like the root of the problem (or, at least, the initial problem) is in
Shows a
I think the problem is in the Lines 1489 to 1493 in 9600186
Only the I'm happy to work on this in a fork and file a PR, if that would be helpful! |
* In inputFiles/testPure1.odd: Constrain choice such that it must contain one of: ** abbr and expan ** expan and abbr ** corr and sic ** orig and reg * Adding tests to both validInstance and invalidInstances for testPure1 * Updating the RNG and the RNG output files
The problem was indeed in Lines 2078 to 2104 in 9600186
So copying over the attributes in I've forked the repo and made the change to |
* Work on #241 * Copy over the context attributes (except (min|max)Occurs) in odd2odd-simplifyODD in order to retain attributes (like preserveOrder) declared on the source element * Adding tests for preserveOrder (#241) * In inputFiles/testPure1.odd: Constrain choice such that it must contain one of: ** abbr and expan ** expan and abbr ** corr and sic ** orig and reg * Adding tests to both validInstance and invalidInstances for testPure1 * Updating the RNG and the RNG output files * Fixes as requested by @sydb in PR #507 * Fixing prose (#507 (comment)) * Test nodes, not names (#507 (comment))
Merged in #507, and no errors on Test or Test2. Yay! |
In an ODD,
<sequence preserveOrder="false">
produces the same RELAX NG as<sequence>
(or<sequence preserveOrder="true">
).For testing, try this tiny ODD that tries to constraint
<choice>
to contain 1<expan>
and 1<abbr>
in either order. Then try it changing "false" to "true". (Note that, to appease GitHub, I have added a “.txt” extension to the filename.)The text was updated successfully, but these errors were encountered: