<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&#39;t know of anything in a DTD that will allow that.&nbsp;&nbsp;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>&nbsp;</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&#39;s values in a list of<br>element<br><br>Hi!<br><br>let&#39;s suppose that we have this xml:<br>...<br>&lt;name&gt;name1&lt;/name&gt;<br>&lt;name&gt;name2&lt;/name&gt;
<br>...<br>&lt;name&gt;nameN&lt;/name&gt;<br><br>Is there a ddt rule that forces to don&#39;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>&quot;Choć tyle wiemy własnym doświadczeniem:<br>W nas jest Raj, Piekło - i do obu - szlaki.&quot;<br>J.K.