Maybe I am not clear on what the end use of this Schema is. If you could clarify please.
1. Do you want to restrinct the name to be unique in the Schema or in the XML instance of that adhers to this Schema ie; the element tag 'e1' must appear only ONCE in the XML file. 2. Is 'e1' defined as a global element ?
1. Do you want to restrinct the name to be unique in the Schema or in the XML instance of that adhers to this Schema ie; the element tag 'e1' must appear only ONCE in the XML file.
The instance. I admit my example was very badly chosen, so I'll rephrase
What I want is an xsd construct so that that the following (piece of) an XML document is valid:
and so that this is invalid:
So basically, I want the XSD to be able to put constraints (in casu: uniqueness) on attribute values over different tags.
Thanks a lot for replying, I really would love to find a solution for this one
Cheers, Ben [ July 31, 2006: Message edited by: Ben Verbeken ]
Joined: Jun 03, 2000
One construct which gaurentees uniqueness of "attribute value" (rather than the attribute name) is the 'ID'. So, one solution is that you define the attribute 'bar' of the 'foo' element to be like ID (or is it IDREF ?). Please look up the XSD documentation on how to define it. I don't have the documentation handy and my internet is very flaky today. Thanks.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com