You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
Relax NG specifies that during simplification group, interleave and choice are transformed so that each of them contain at most two children. (That's step 10.) This leads to a multiplication of elements and some complications:
It takes time to perform the transformation.
More elements means more walking during later simplification steps and during constraint checks.
It also leads to a bigger JSON file once serialized.
It also means a deeper walker tree during validation, though this may not have that much impact on validation performance.
Solution 1: Don't Perform the Work in Step 10
Not performing the simplification of these elements would take care of the issues above. However:
It requires rewriting Group, Interleave and Choice to handle multiple children, which may make them much more complex.
It means losing the 1-to-1 steps between our internal simplifier and the old XSL code. Harder to test.
We need to carefully assess the impact on later simplification steps because they assume that the transformation in step 10 has been done.
It may also affect the constraint checks.
Solution 2: Add a Later Step Which Collapses the Elements
Another approach, rather than not performing the transformation, would be to add a step that would collapse the group, interleave and choice elements at the end of simplification. This would take care of complications 3 and 4 but it would add to the total simplification time.
The text was updated successfully, but these errors were encountered:
Problem
Relax NG specifies that during simplification
group
,interleave
andchoice
are transformed so that each of them contain at most two children. (That's step 10.) This leads to a multiplication of elements and some complications:It takes time to perform the transformation.
More elements means more walking during later simplification steps and during constraint checks.
It also leads to a bigger JSON file once serialized.
It also means a deeper walker tree during validation, though this may not have that much impact on validation performance.
Solution 1: Don't Perform the Work in Step 10
Not performing the simplification of these elements would take care of the issues above. However:
It requires rewriting
Group
,Interleave
andChoice
to handle multiple children, which may make them much more complex.It means losing the 1-to-1 steps between our internal simplifier and the old XSL code. Harder to test.
We need to carefully assess the impact on later simplification steps because they assume that the transformation in step 10 has been done.
It may also affect the constraint checks.
Solution 2: Add a Later Step Which Collapses the Elements
Another approach, rather than not performing the transformation, would be to add a step that would collapse the
group
,interleave
andchoice
elements at the end of simplification. This would take care of complications 3 and 4 but it would add to the total simplification time.The text was updated successfully, but these errors were encountered: