<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hhmm I don't know of anything in a DTD that will allow that. Seems like<br>a java method is the way to go.
</blockquote><div><br>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.
<br><br>For an example of validation using schema, see here: <a href="http://cafeconleche.org/books/xmljava/chapters/ch14s10.html">http://cafeconleche.org/books/xmljava/chapters/ch14s10.html</a><br><br>Grzegorz<br> </div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-----Original Message-----<br>From: <a href="mailto:jdom-interest-bounces@jdom.org">jdom-interest-bounces@jdom.org
</a><br>[mailto:<a href="mailto:jdom-interest-bounces@jdom.org">jdom-interest-bounces@jdom.org</a>] On Behalf Of NP<br>Sent: Monday, October 01, 2007 2:45 PM<br>To: <a href="mailto:jdom-interest@jdom.org">jdom-interest@jdom.org
</a><br>Subject: [jdom-interest] No duplicates element's values in a list of<br>element<br><br>Hi!<br><br>let's suppose that we have this xml:<br>...<br><name>name1</name><br><name>name2</name>
<br>...<br><name>nameN</name><br><br>Is there a ddt rule that forces to don't have duplicate value of name?<br>or: i must write a function (using jdom) that recovers all the elements<br>and controls if there is a duplicate value?
<br>_______________________________________________<br>To control your jdom-interest membership:<br><a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
</a><br><br>_______________________________________________<br>To control your jdom-interest membership:<br><a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
</a><br></blockquote></div><br><br clear="all"><br>-- <br>"Choć tyle wiemy własnym doświadczeniem:<br>W nas jest Raj, Piekło - i do obu - szlaki."<br>J.K.