<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="text-align: left;">Is there an XML Schema processor that makes this analysis ?<br></div><font><font color="#330099" face="Arial, Helvetica, sans-serif"><br></font></font>>>>>>>><br>
<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;"><style type="text/css">DIV {
MARGIN:0px;}
</style>
<div dir="ltr" align="left"><span class="215241717-01082006"><font color="#0000ff" face="Arial" size="2">No, you need to do a lot more than parsing the schema. You
already hint at this when you talk about "starting from the root": you don't
mean the XML root here, you mean some kind of semantic root. (You're wrong to
imagine that a schema is structured as a tree. It's a graph, and quite a complex
one.) To do what you are attempting, you need to do much more than parse the
schema, you need to analyze the information in it. Since that analysis is
complex, and since there are off-the-shelf schema processors that do it for
you, I would suggest that you use them rather than trying to write your
own.</font></span></div>
<div dir="ltr" align="left"><span class="215241717-01082006"><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span class="215241717-01082006"><font color="#0000ff" face="Arial" size="2">Michael Kay</font></span></div>
<div dir="ltr" align="left"><span class="215241717-01082006"><font color="#0000ff" face="Arial" size="2"><span><a target="_blank" href="http://www.saxonica.com/">http://www.saxonica.com/</a></span></font></span></div>
<div dir="ltr" align="left"><span class="215241717-01082006"> </span></div><br>
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr tabindex="-1">
<font face="Tahoma" size="2"><b>From:</b> jdom-interest-bounces@jdom.org
[mailto:jdom-interest-bounces@jdom.org] <b>On Behalf Of </b>enis
enis<br><b>Sent:</b> 01 August 2006 16:41<br><b>To:</b> Kevin POCHAT;
jdom-interest@jdom.org<br><b>Subject:</b> Re : [jdom-interest] Parsing an XML
Schema<br></font><br></div>
<div></div>
<div style="font-size: 12pt; font-family: times new roman,new york,times,serif;">I
just need to parse the schema (dtd or xml schema corresponding) as a tree
structure, it means starting from the root, and then the children (prefix
parcours).<br><br>>>>>>>><br>
<div style="font-size: 12pt; font-family: times new roman,new york,times,serif;">
<div style="font-size: 12pt; font-family: times new roman,new york,times,serif;">True,
the XML Schema never declares a root element for its instances (valid xml
files), but there is one for the schema itself (the <schema>
tag).<br>Seeing your answer, I can't hold myself to ask you this : Are you
trying to parse your XML Schema file (.xsd) ? or your XML files valid against
your schema (.xml or anything else) ? <br><br><br>
<div><span class="gmail_quote">2006/7/31, enis enis <<a rel="nofollow" id="bodyLinks" target="_blank" href="mailto:enis_ch2001@yahoo.fr">enis_ch2001@yahoo.fr</a>>:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div>
<div style="font-size: 12pt; font-family: times new roman,new york,times,serif;"></div>
<div><span class="q">
<div style="text-align: left;"><font size="3"><span style="font-family: monospace;"></span>The problem is that a schema does not
define a "root" element , and that's the main point for me, because I need
to work on the file (xml schema or dtd) as a tree structure, it means the
parsing must start by the root element and then the chidren of the current
element (from left to right -> prefix). So how can I do that ?
<br><br></font><font size="3"><a target="_blank" rel="nofollow" id="bodyLinks"></a></font></div><font size="3"></font></span></div></div></div></blockquote></div><br>
<div>_______________________________________________<br>To control your
jdom-interest membership:<br><a id="bodyLinks" 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></div></div><br></div></div></blockquote></div><br></div></div></body></html>