Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: Re: No duplicates element 's values in a list of element

Subject: Re: No duplicates element 's values in a list of element

2007-10-02       - By Tatu Saloranta

 Back
And of course you can use Relax NG (http://relaxng.org/) validation, which
combines power of w3c Schema, and quite readable syntax (esp. with the compact
notation).
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.
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.

-+ Tatu +-

-- -- Original Message ----
From: Grzegorz Kaczor <grzegorz.kaczor@(protected)>
To: NP <nicola.padovano@(protected)>
Cc: jdom-interest@(protected)
Sent: Tuesday, October 2, 2007 1:39:26 AM
Subject: Re: [jdom-interest] No duplicates element's values in a list of element

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@(protected)

[mailto:jdom-interest-bounces@(protected)] On Behalf Of NP
Sent: Monday, October 01, 2007 2:45 PM
To: jdom-interest@(protected)

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@(protected)


__ ____ ____ ____ ____ ____ ____ ____ ____ ____
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)





--
"Cho? tyle wiemy w?asnym do?wiadczeniem:
W nas jest Raj, Piek?o - i do obu - szlaki."
J.K.






     
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______
__ __
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
<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@(protected)&gt;<br>To: NP &lt;nicola.padovano@(protected)&gt;<br>Cc: jdom
-interest@(protected)<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
@(protected)">jdom-interest-bounces@(protected)
</a><br>[mailto:<a rel="nofollow" target="_blank" href="mailto:jdom-interest
-bounces@(protected)">jdom-interest-bounces@(protected)</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@(protected)">jdom-interest@(protected)
</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@(protected)">http://www.jdom.org
/mailman/options/jdom-interest/youraddr@(protected)
</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@(protected)">http://www.jdom
.org/mailman/options/jdom-interest/youraddr@(protected)
</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>
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.