A
Andrew
I have used XML for a few years now but this is the first time I have
had to create a schema. I already have written the C++ code, using
libxml2, that serialises and deserialises the messages. I just need to
define a schema for all the messages so they can (optionally) be
validated. Here is an example:
I have a CpuLoad message which contains xml:decimal for user, sys,
nice, idle, wait, total. I have defined this using xs:all with
minOccurs=1 but my colleagues say they would use xs:sequence. I have
discussed it with them and pointed them to the documentation at
http://www.w3schools.com/schema/schema_elements_ref.asp. There it says
that sequence is ordered but all is not. Sequence is zero or more but
all is zero or one. They agree that unordered and one of each is what
I want but they say they would still use sequence because everyone
else does it like that. Really? I see plently of cases on this ng
where people are using all.
I don't want to go against the flow of what people normally do when
defining schemas. Any advice please?
Regards,
Andrew Marlow
had to create a schema. I already have written the C++ code, using
libxml2, that serialises and deserialises the messages. I just need to
define a schema for all the messages so they can (optionally) be
validated. Here is an example:
I have a CpuLoad message which contains xml:decimal for user, sys,
nice, idle, wait, total. I have defined this using xs:all with
minOccurs=1 but my colleagues say they would use xs:sequence. I have
discussed it with them and pointed them to the documentation at
http://www.w3schools.com/schema/schema_elements_ref.asp. There it says
that sequence is ordered but all is not. Sequence is zero or more but
all is zero or one. They agree that unordered and one of each is what
I want but they say they would still use sequence because everyone
else does it like that. Really? I see plently of cases on this ng
where people are using all.
I don't want to go against the flow of what people normally do when
defining schemas. Any advice please?
Regards,
Andrew Marlow