[jdom-interest] No duplicates element's values in a list of
element
Grzegorz Kaczor
grzegorz.kaczor at gmail.com
Tue Oct 2 01:39:26 PDT 2007
>
> Hhmm I don't know of anything in a DTD that will allow that. Seems like
> a java method is the way to go.
Or XML Schema which is a more modern and much more powerful validation
mechanism. Unfortunately, more difficult to learn and a bit rough in syntax.
In schema you can use the uniqueness key to ensure uniqueness of name
element values.
For an example of validation using schema, see here:
http://cafeconleche.org/books/xmljava/chapters/ch14s10.html
Grzegorz
-----Original Message-----
> From: jdom-interest-bounces at jdom.org
> [mailto:jdom-interest-bounces at jdom.org] On Behalf Of NP
> Sent: Monday, October 01, 2007 2:45 PM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] No duplicates element's values in a list of
> element
>
> Hi!
>
> let's suppose that we have this xml:
> ...
> <name>name1</name>
> <name>name2</name>
> ...
> <name>nameN</name>
>
> Is there a ddt rule that forces to don't have duplicate value of name?
> or: i must write a function (using jdom) that recovers all the elements
> and controls if there is a duplicate value?
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>
--
"Choć tyle wiemy własnym doświadczeniem:
W nas jest Raj, Piekło - i do obu - szlaki."
J.K.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20071002/e1ad317b/attachment.htm
More information about the jdom-interest
mailing list