Handling same element with different types.
-
I've been givin the task of developing a schema for some message formats. The formats are in XML and they all use common elements except for one. The group element is different for each of the messages. one message it may be of type lineGroup of another bitGroup. My question is how can I make my schema take either type group? I've found that one element name with 2 types does not work. So what is the work around? I'm new to this so if there is something I'm missing please fill me in. TIA. example of the xml file (the <> were intentionally left out) in one file...
group type="lineGroup"
name message1 /name
.
.
.
/groupIn the other file
group type="bitGroup"
name message2 /name
.
.
.
/groupnay
-
I've been givin the task of developing a schema for some message formats. The formats are in XML and they all use common elements except for one. The group element is different for each of the messages. one message it may be of type lineGroup of another bitGroup. My question is how can I make my schema take either type group? I've found that one element name with 2 types does not work. So what is the work around? I'm new to this so if there is something I'm missing please fill me in. TIA. example of the xml file (the <> were intentionally left out) in one file...
group type="lineGroup"
name message1 /name
.
.
.
/groupIn the other file
group type="bitGroup"
name message2 /name
.
.
.
/groupnay
This schema allows the attribute of the Group element names Type to be either LineGroup or BitGroup. To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli