Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xml-schema:Uniqueness attributes of differend elements

Reply
Thread Tools

xml-schema:Uniqueness attributes of differend elements

 
 
thijs.kupers@gmail.com
Guest
Posts: n/a
 
      01-03-2005
Hi

I want to define a schema for my xml. I want to transform the xml in
java-code by xslt, so it is important (for naming conflicts) that the
values of the name-attributes in the xml been unique.

I have a xml file like this:

<someroot>
<A_Item name="foo">
<B_Item name="123"/>
<B_Item name="456"/>
</A_Item>
<B_Item name="foo"/>
</someroot>

The '<B_Item name="foo"/>' must give an error by the validator check.
How can I do that with xml-schema?

Regards,
Thijs

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      01-03-2005


wrote:


> I have a xml file like this:
>
> <someroot>
> <A_Item name="foo">
> <B_Item name="123"/>
> <B_Item name="456"/>
> </A_Item>
> <B_Item name="foo"/>
> </someroot>
>
> The '<B_Item name="foo"/>' must give an error by the validator check.
> How can I do that with xml-schema?


<xs:attribute name="name" type="xs:ID" />

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
thijs.kupers@gmail.com
Guest
Posts: n/a
 
      01-03-2005
Is it so easy?

Thanks

Thijs

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
data attributes override method attributes? Jayden Python 16 09-29-2012 03:20 AM
attributes ala java annotations or .Net attributes? Kyle Schmitt Ruby 3 07-24-2007 07:48 PM
class attributes & data attributes james_027 Python 2 06-20-2007 03:12 PM
WebControl.Attributes.Add and custom attributes P4trykx ASP .Net 2 01-31-2007 04:33 PM
Parse reserved attributes as normal attributes Max XML 1 09-22-2006 12:04 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57