[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML-Data Samples

  • From: Sung_Nguyen@datacard.com (Sung Nguyen)
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 30 Jul 1998 10:59:36 -0500

xml data samples
     Hello all:
     
     I am a newbie to XML - I used IBM Alpha XML Parser to
     work on these following samples (from XML-Data spec).
     
     I don't understand what is the context of "schema" in this
     sample.  
     
     Is the schema is a XML DTD or just XML file?
     How do I include it into my XML file?
     
     Please enlighten me - I greatly appreciate.
     
     SeanN 
     
     ---------------------------------------------------------------
     <?xml:namespace name="http://company.com/schemas/books/" as="bk"/>
     <?xml:namespace name="http://www.ecom.org/schemas/dc/" as="ecom" ?>
     
     <bk:booksAndAuthors>
         <Person>
             <name>Henry Ford</name>
             <birthday>1863</birthday>
         </Person>
     
         <Person>
             <name>Harvey S. Firestone</name>
         </Person>
     
         <Person>
             <name>Samuel Crowther</name>
         </Person>
     
         <Book>
             <author>Henry Ford</author>
             <author>Samuel Crowther</author>
             <title>My Life and Work</title>
         </Book>
     
         <Book>
             <author>Harvey S. Firestone</author>
             <author>Samuel Crowther</author>
             <title>Men and Rubber</title>
             <ecom:price>23.95</ecom:price>
         </Book>
     </bk:booksAndAuthors>
     
     --------------------------------------------------------------------
     The schema for http://company.com/schemas/books: 
     
     <?xml:namespace name="urn:uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882/" 
     as="s"/?>
     <?xml:namespace href="http://www.ecom.org/schemas/ecom/" as="ecom" ?>
     
     <s:schema>
     
         <elementType id="name">
             <string/>
         </elementType>
     
         <elementType id="birthday">
             <string/>
             <dataType dt="date.ISO8601"/>
         </elementType>
     
         <elementType id="Person">
             <element type="#name" id="p1"/>
             <element type="#birthday" occurs="OPTIONAL">
                 <min>1700-01-01</min><max>2100-01-01</max>
             </element>
             <key id="k1"><keyPart href="#p1" /></key>
         </elementType>
     
         <elementType id="author">
             <string/>
             <domain type="#Book"/>
             <foreignKey range="#Person" key="#k1"/>
         </elementType>
     
         <elementType id="writtenWork">
             <element type="#author" occurs="ONEORMORE"/>
         </elementType>
     
         <elementType id="Book" >
             <genus type="#writtenWork"/>
             <superType href=" 
     http://www.ecom.org/schemas/ecom/commercialItem"/>
             <superType href=" 
     http://www.ecom.org/schemas/ecom/inventoryItem"/>
             <group groupOrder="SEQ" occurs="OPTIONAL">
                 <element type="#preface"/>
                 <element type="#introduction"/>
             </group>
             <element href="http://www.ecom.org/schemas/ecom/price"/>
             <element href="ecom:quantityOnHand"/>
         </elementType>
     
         <elementTypeEquivalent id="livre" type="#Book"/>
         <elementTypeEquivalent id="auteur" type="#author"/>
     
     </s:schema>

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.