W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2003

xml schema for tree structure

From: rama krishna <srinuram1@yahoo.com>
Date: Tue, 15 Apr 2003 22:58:48 -0700 (PDT)
Message-ID: <20030416055848.14973.qmail@web13001.mail.yahoo.com>
To: xmlschema-dev@w3.org
my requirement is, I would like to write an xsd schema for the xml file (tree structure )which is given below  .
Xml sample:<data language="English">-----------------1
 
 <datalink type="navigational" template="templateid">-------------1.1
  <name>String</name>
  <detaildescription>String</detaildescription>
  <image>String</image>  <datalink type="navigational" template="templateid">-----------1.1.1
   <name>String</name>
   <detaildescription>String</detaildescription>
   <image>String</image>
   
   <datalink type="terminal" template="templateid"> 
    <name>String</name>
    <detaildescription>String</detaildescription>
    <image>String</image>
    <page>
     <header>String</header>
     <shortdescription>String</shortdescription>
     <image>String</image>
     <imagedescription>String</imagedescription>
    </page>
   </datalink>
  </datalink>-------------end of 1.1.1
  
 </datalink>----------------end of 1.1 <datalink type="terminal" template="templateid">-------------1.2
  <name>String</name>
  <detaildescription>String</detaildescription>
  <image>String</image>
  <page>
   <header>String</header>
   <shortdescription>String</shortdescription>
   <image>String</image>
   <imagedescription>String</imagedescription>
  </page>
 </datalink>----------end of 1.2
</data>-----------------end of 1 There are basically two nodes, one is navigational which contains description about the node (i.e. name, detaildescription, image) and also information about the child nodes.
Second one is a Terminal node, which is some what similar to leaf node.
Navigational node must contain atleast one terminal node and it can have 'n' number of either navigation node or Terminal nodes (similar to tree structure). 
I would like to write an xsd for above mentioned tree structure and would like to use jaxb to create java equivalent objects. I would like to know how can I implement schema for recursive loop (tree structure) . Thank you.Regards,
Ramki.


---------------------------------
Do you Yahoo!?
Yahoo! News - Today's headlines
Received on Wednesday, 16 April 2003 01:58:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT