OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Schema validation of recursive structures

[ Lists Home | Date Index | Thread Index ]
  • To: "Doug Rudder" <drudder@drugfacts.com>,<xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] Schema validation of recursive structures
  • From: "Alessandro Barbosa" <abarbosa@fpf.br>
  • Date: Thu, 20 Jan 2005 16:58:45 -0400
  • Thread-index: AcT/Koiu+OW4H/czQQW1aNDIrxWqgQAByWkg
  • Thread-topic: [xml-dev] Schema validation of recursive structures

Thank you very much! Worked!

 

Best regards,

Alessandro

 

-----Original Message-----
From: Doug Rudder [mailto:drudder@drugfacts.com]
Sent: quinta-feira, 20 de janeiro de 2005 16:01
To: Alessandro Barbosa; xml-dev@lists.xml.org
Subject: RE: [xml-dev] Schema validation of recursive structures

 

Recursive structures are certainly possible in schemas.  A common example would be recursive <section> elements, say with a title and one or more paras and zero or more sections.

 

Here's a DTD sample:

 

<!ELEMENT section  (title , para+ , section*) >

 

Here's a Schema sample:

 

      <xsd:element name="section">
         <xsd:complexType>
            <xsd:sequence>
               <xsd:element ref="title"/>
               <xsd:element ref="para" maxOccurs="unbounded"/>
               <xsd:element ref="section" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
         </xsd:complexType>
      </xsd:element>

 

The minOccurs and maxOccurs of course can be further defined.

 


From: Alessandro Barbosa [mailto:abarbosa@fpf.br]
Sent:
Thursday, January 20, 2005 1:40 PM
To: xml-dev@lists.xml.org
Subject: [xml-dev] Schema validation of recursive structures

Hello to everyone,

I have a problem and I don't know how solved it.

 

I need validates a node seem at this:

<root>

<A>

            <element1/>

            <element2/>

            <A>

                       <element1/>

                       <element2/>

                       <element3/>

                       <A>

                                   <element1/>

                       <A>

            <A>

</A>

            </root>

 

            The node A shall have sub items of itself, is it possible?

 

Thank's

 

 


Alessandro de A. Barbosa

System Developer

Fundação Des. Paulo Feitoza - Manaus - AM

Mobile : 8125 - 7719

Business Phone: 55 92 614-9797

 

Msn: alessandrovila@hotmail.com

ICQ: 241240451; Status:  


 

 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.837 / Virus Database: 570 - Release Date: 17/1/2005


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.837 / Virus Database: 570 - Release Date: 17/1/2005


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.837 / Virus Database: 570 - Release Date: 17/1/2005





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS