Guest kalos Posted June 9, 2008 Share Posted June 9, 2008 Hi all,I know the "Consistent element's definition" rule in xml W3C schema-language, and so I experiment the difficulties of defining an element that contains two other elements with same name but different types. A thing like <A> <B x="..."> ... </B> <B y="..."> ... </B></A> With first end second B having different attributes end/or childs. Of course I can define it using che "choice" or "substitution-groups" language-constructs, but what if I have to fix some constraints about each of B's, like some order, occurrence or attribute values and types? Could I anyway define, really differents B's type, an then use o reference that definitions? Thank you all in advance for any suggestion.Kalos Link to comment Share on other sites More sharing options...
Kahor Posted June 9, 2008 Share Posted June 9, 2008 I guess it could be possible if you make sure to use local declarations (no ref) for at least one of the B element, and you make sure that the two elements with the same name are declared in a precise order in your xml schema declaration so that your .xsd know which <B..> he's refering to. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.