Closed Moult closed 1 year ago
According to my XMLSpy validation this is the only valid way to construct the XSD. I think it has to do with the reuse of parts of the schema. If we can get it in random order but still have valid XSD I'm happy to change it.
Sounds like it should be xs:all
with the appropriate min/maxOccurs?
all: The elements can occur in any order. https://www.w3.org/TR/xmlschema11-1/#element-all
I can only second @andyward. I was very confused when I came across this while giving a TS implementation a try. If the order isn't adding any value please us xs:all
, otherwise it'll take extra effort in all implementations to keep the xml tags in the right order 👍
ok; looking for feedback from others as well
Sounds like a good suggestion if random order is intended.
I do like seeing the nodes in the same order in files though. Also makes it easy to query by index.
There's no semantic need for constraining the order.
I second the schema change that Andy suggests. It is more tolerant, but retains backwards compatibility.
On Thu, Sep 21, 2023, 17:26 SergejMuhic @.***> wrote:
Sounds like a good suggestion if random order is intended.
I do like seeing the nodes in the same order in files though. Also makes it easy to query by index.
— Reply to this email directly, view it on GitHub https://github.com/buildingSMART/IDS/issues/175#issuecomment-1729811867, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJY7MLBLEF3HVVTEZN3Z5TX3RMDPANCNFSM6AAAAAA2SOTYBM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@SergejMuhic FYI querying by index might be dangerous, as a lot of the items in the sequences are optional (marked with minOccurs=0
).
@SergejMuhic FYI querying by index might be dangerous, as a lot of the items in the sequences are optional (marked with
minOccurs=0
).
Missed that. I will not query by index! 😄
xs:sequence
is used in many places across the schema. Are we intending to replace it everywhere with xs:all
?
In the call we have identified some value of keeping sequences in order:
So the decision is to keep the sequence elements.
Because xs:sequence is used, that means that the description element must be exactly in that position and in no other. Is this intentional? Sounds like it's just a pain with no real meaning.
I've noticed others and most recently https://github.com/IfcOpenShell/IfcOpenShell/issues/3476 who seem to write IDSes by hand run into this problem.