<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><span>And of course you can use Relax NG (<a target="_blank" href="http://relaxng.org/">http://relaxng.org/</a>) validation, which combines power of w3c Schema, and quite readable syntax (esp. with the compact notation).</span><br>While w3c schema has its uses (mostly for data binding), its not all that good for validation. RNG on the other hand is specifically designed for validation, and is very good at that.<br>There both stand-alone RNG validators (Multi-schema Validator, yang) and many xml parsers natively support validation (not sure about Xerces, but Woodstox uses msv to implement full parser and writer-side RNG validation; and I think you can plug-in generic sax validator with Xerces). Also, I think Saxon
 xslt/xquery processor can probably do RNG validation as well.<br><br>-+ Tatu +-<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Grzegorz Kaczor &lt;grzegorz.kaczor@gmail.com&gt;<br>To: NP &lt;nicola.padovano@gmail.com&gt;<br>Cc: jdom-interest@jdom.org<br>Sent: Tuesday, October 2, 2007 1:39:26 AM<br>Subject: Re: [jdom-interest] No duplicates element's values in a list of element<br><br><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.&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 rel="nofollow" target="_blank" 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 rel="nofollow" target="_blank" href="mailto:jdom-interest-bounces@jdom.org">jdom-interest-bounces@jdom.org
</a><br>[mailto:<a rel="nofollow" target="_blank" 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 rel="nofollow" target="_blank" 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>&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'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 rel="nofollow" target="_blank" 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 rel="nofollow" target="_blank" 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.
</div><br></div></div><br>
      <hr size=1>Moody friends. Drama queens. Your life? Nope! - their life, your story.<br> <a href="http://us.rd.yahoo.com/evt=48224/*http://sims.yahoo.com/">Play Sims Stories at Yahoo! Games. </a></body></html>