perfectxml.com
Focus Info Bank Free Library Software News About Us
  You are here: home »» Free Library » Syngress Publishing Saturday, 5 March 2005


goto Page 2

Sample Chapter from the book XML .NET Developer's Guide. Reprinted by permission, Syngress Publishing © 2002.

Chapter 5

Using XML Schemas In The .NET Framework

Introduction

XML Schema, in simple terms, is a grammar file to validate an XML file. You can define your constraints for the related XML documents which aren’t expressable in DTD’s (Document Type Definition). DTD’s have their own syntax whereas Schema’s were based on the XML Language Specifications. We need to see little more of what to or why to talk about usage of Schema rathen than a DTD in .NET Framework.

Schema defines the datatype of the XML Document along with the tagnames (user-defined), rather than a DTD, which discuss about tagnames and whether they are required or not without mentioning the datatypes of them. Popularity of XML Schema is also because it can be validated and parsed with same technology like anyother XML file. The term “schema” itself came from the database world where it similarly described the structure of data.

There is an enormous amount of support for XML Schema from W3C Working group (where various companies share information together) and there is no doubt that XML Schema increases XML's power and utility to the electronic commerce systems. Webservices and peer-2-peer computing are widely enhanced by the release of XML Schema.

Throughout this Chapter, we will see another new technology “HR-XML” (Human Resource Extensible Markup Language, www.hr-xml.org) used for xml examples. This is just for a change, instead using regular “hello world” or the “purchaseorder” examples. All XML files used in this chapter are taken from HR-XML people. Along with using the real-time application examples we will be seeing the real-world examples to add more fun to grasping the things quick at first stage. And most important thing is we will be discussing about the System.XML.Schema Namespace to harness your XML Schema needs.

Explaining XML Schema Definition

XML Schema Definition Language is categorised into two parts such as Structures and Datatypes. There are various main features, which define what XML Schema whole together. Let us take a look at them.

·         XML Schema is in XML syntax format. (there is a Schema for Schemas)

·         Uses and supports Namespaces (blocks of assembly)

·         Object-oriented-like type system for declarations (with inheritance, subsumption, abstract types, and finals)

·         Global and local type definitions

·         Modularization

·         Structured self-documentation

·         Cardinality constraints for sub-elements

·         Nil values (missing content)

·         Attribute and element defaults

·         Any-element, any-attribute

·         Uniqueness constraints and ID/IDREF attribute scope

·         Regular expressions for specifying valid chardata and attribute values

·         Lots of built-in data types for chardata and attribute values

 

 

Elaborating on Definitions:

Global and local type definitions: once we declare an element globally we cannot change the value and use them in the local scope. A global level element has the same value or type throughout the complete schema’s scope i.e.,

 Global type definition Example:   

 

<schema xmlns="http://www.w3.org/2001/XMLSchema"

        xmlns:po="http://www.syngress.com/Author"

        targetNamespace="http://www.syngress.com/Author">

<!—- Global Elements -->

 <element name="Authors" type="au:AuthorDetails"/>

 <element name="name"  type="au:Details"/>

 <element name="address"  type="au:Details"/>

 <element name="firstname" type="string">

 <element name="telenumber" type="string">

<!—- Global Elements -->

 <complexType name="AuthorDetails">

  <sequence>

   <element ref="au:name"/>

   <element ref="au:address"/>

  </sequence>

 </complexType>

</schema>

<complexType name="Details">

<sequence>

   <element ref="firstname"/>

   <element ref="telenumber"/>

  </sequence>

 </complexType>

</schema>

 

Local type definition Example:

 

<schema xmlns="http://www.w3.org/2001/XMLSchema"

        xmlns:po="http://www.syngress.com/Author"

        targetNamespace="http://www.syngress.com/Author"

elementFormDefault="unqualified"

        attributeFormDefault="unqualified">

 <element name="Authors" type="au:AuthorDetails"/>

 

 <complexType name="AuthorDetails">

  <sequence>

   <!—- Local defined Elements -->

   <element name="name"  type="au:Details"/>

   <element name="address"  type="au:Details"/>  

   <!—- Local defined Elements -->

  </sequence>

 </complexType>

 <complexType name="Details">

  <sequence>

     <!—- same elements defined Locally -->

    <element ref="au:firstname" type="string"/>

    <element ref="au:telenumber" type="string"/>

     <!—- same elements defined Locally -->

 </sequence>

</complexType>

</schema>

In any programming language such as C, VB or Java, we write different class modules and use them throughout the project by using the class names and termed as the resusability of code or refer a component as a dll (dynamic link library) and use the functions in that dll. Sameway in XML Schema, we can use a part of elements section (reusability) from same document or inherit a particular section or a full content of another document type (better modularity). The reusability and modularity provides a better descriptive power to XML Schema.

Nil or missing values occurs sometimes in an xml file, when we look at the following example:

authors.xml

<authors>

<author name = ‘abc’>

   <book>xml</book>

   <addr>MI</addr>

   <cellNumber>111-111-1111</cellNumber>

</author>

<author name = ‘xyz’>

   <book>html</book>

   <addr>NJ</addr>

 </author>

</authors>

In the above authors.xml file, the second element or for the author named xyz, the <cellNumber> is missing. The content would have been missed due to various reasons, maybe he/she doesn’t like to provide the cellnumber or doesn’t own one. It can be specified in two ways, in schema we can declare that element as

<xsd:element name="cellNumber" type="xsd:string" nillable="true"/>

Or can be written in the xml file directly as

<cellNumber xsi:nil="true"></cellNumber>

W3C XML Schema defines the Cardinality of an element (i.e. the number of its possible occurrences) than any other specifications.

There will be sometimes where we will be in need of using html tags in between the xml document for various purposes or due to a particular appilication design issue we might need to use that, in that case we can embed the html tags that we need in the xml user-defined tags as:

<design_html>

<table>

<tr>

<td>

hello brother

</td>

</tr>

</table>

</design_html>

In an XML document the tags table, tr, td does not act as html tags instead they behave as an XML tag only. Still, using various namespaces for the design_html (an xml tag) and can use the html tags packed in them. This concept is known as the any element, any attribute (we can use the attributes also such as color etc.,). You can find much information on ID, IDREF and datatypes in the following sections.

 

XML Schema Requirements

Requirements are splitted as Structure and the Datatype Requirements of Schema. According to W3C the following points are the design principles, which led to the requirement of XML Schema and the explanation is provided briefly:

·         more expressive than XML DTDs

Schema contains datatypes for elements whereas DTD’s just declare the elements.

·         expressed in XML

Schema’s are expressed in XML format so that they can be parsed and validated

·         self-describing

By looking at XML Schema itself, one should understand the purpose of that particular schema, though it is complicated in structure.

·         usable by a wide variety of applications that employ XML.

·         directly usable on the Internet

·         optimized for interoperability

Interoperability: Machine and Language independent.

·         simple enough to implement with modest design and runtime resources

XML Schema Structures

The Structure is the first step, which needs to be changed in real-world applications with respective to the DTD. Some of the following points are the basic requirements, which urged the effort of structuring XML Schema:

 

Reconstruct DTD functionality using XML

Integrate Namespaces

Provide a usable inventory of basic datatypes

Support object-oriented design

 

DTD by itself is not an XML file, and in order to keep pace with the real time application needs, a file that validates the XML file, should be more powerful. XML Schema is an XML file and can be parsed, xml file can be validated against them. By Integrating Namespaces we have more powerful schema with which we can include or import any other schema namespaces other than the one we are using. Inheritance in Schema is supported as of now and this had to be stablized first. W3C working group are also working on enabling Schema’s with mulitple inheritance concept as in other programming languages.

 

In this section let us elaborate and describe what are all the components that is required to build a Structure. There are totally 13 kinds of components. We will be using the following primary components to build an XML Schema structure. We will be discussing one by one with code snippets and explanations briefly.

1.       Simple type definitions

2.       Complex type definitions

3.       Attribute declarations

4.       Element declarations

5.       Attribute group definitions

6.       Identity-constraint definitions

7.       Model group definitions

8.       Notation declarations

9.       Annotations

10.   Model groups

11.   Particles

12.   Wildcards

13.   Attribute Uses

 

The explanations for all these are going to be based on a real time application. As it is mentioned earlier we will be using the HR-XML technology for our samples/examples only. In a real world everything is B2B and Market centric. One of the important processes in any Industry is Recruiting (JobPositionPosting, JobPositionSeeker), Employee Benefits, etc., we now know how tedious is the paper work and how much difficult for a Supplier to exchange information between themselves for Bidding, Maintaining records and a lot of things.

 

The solution for this is necessary information had to be shared between Suppliers. Once the Supplier adheres to HR-XML technology there will not be a necessity to submit Resumes on all JobBoards. Once a JobPositionSeeker (Candidate) finds a job, his/her status will be updated and the Resume will not be available then for other openings. Supplier’s requests and responses can be automated using XML technology. HR-XML had released some schema files recently (around Oct 3rd week, 2001) and as of now when this chapter is written they are using their DTD’s. Using XML Spy 4 (Beta Version) XML Schema files are generated based on these XML files. There are various sections in HR-XML like JobPositionPosting, JobPositionSeeker and some more for which they are yet working. In the Wallet the latest version of HR-XML files is archived and you can take a look at them.

 

All codes and samples are accompanied in the Wallet CD too.

 

The following XML file (JobPositionPosting-1_1.xml ) carries the information of an open position in a company with descriptions and whom to contact for that. Let us now take a look at the XML Schema generated for this XML File using XMLSpy editor (which supports the latest w3c draft on XML Schema).

 

As a beginner level reader, if you are unable to see what the following example is all about, and then the following explanation is for you! In an online JobBoard there will be various companies listed, with the listing of current available jobs with them (open position) and whom to contact (say HR) for applying to that vacancy.

In this scenerio, the company (that you are going to apply for) would have posted the following details:

The company ‘s name which is going to hire you, the contact persons details such as phone number, email address etc., and then what skillsets, education and experience is required for that open position (vacancy). Keeping this in mind now look at the following xml file.

 

JobPositionPosting-1_1.xml

 

<?xml version = "1.0"?>

<JobPositionPosting status = "active">  

       <JobPositionPostingId>99999977777</JobPositionPostingId>  

       <HiringOrg type = "unspecified"> 

              <HiringOrgName>Goodcompany, Inc.</HiringOrgName> 

              <WebSite>http://www.goodcompany.com</WebSite> 

              <Industry>

<SummaryText>Financial Planning Software </SummaryText> 

              </Industry> 

              <Contact>

                     <PersonName>  

                           <GivenName>Jane</GivenName>  

                     <FamilyName primary = "undefined"> Mangler 

</FamilyName>

                     </PersonName>

                     <PositionTitle>HR Manager</PositionTitle>

                     <PostalAddress type = "undefined"> 

                           <CountryCode>US</CountryCode> 

                           <PostalCode>27613</PostalCode> 

                           <Region>NC</Region> 

                           <Municipality>Raleigh</Municipality> 

                           <DeliveryAddress>

<AddressLine>111 Any Street</AddressLine>

                                  <AddressLine>Suite 111</AddressLine> 

                           </DeliveryAddress>

                     </PostalAddress> 

              </Contact>  

       </HiringOrg>  

       <JobPositionInformation> 

              <JobPositionTitle>PR Specialist</JobPositionTitle> 

              <JobPositionDescription>

                     <Classification distribute = "external">  

                            <DirectHireOrContract>

                                  <Contract/> 

                                  <SummaryText>Contract to direct hire is

desirable.</SummaryText>  

                           </DirectHireOrContract>  

                           <Duration> 

                                  <Temporary>

                                    <TermLength>6 months</TermLength>

                                    <SummaryText>Evaluation for direct

  hire after 6 months</SummaryText> 

                                  </Temporary>  

                           </Duration>

                     </Classification>

                     <EssentialFunctions>  

                           <UL> 

                                  <LI>Develop and implement corporate and product PR programs aligned with company objectives to generate positive press coverage;</LI> 

                                  <LI>Research, develop and maintain press and analyst database;</LI> 

                                  <LI>Cultivate relationships with targeted press and industry analysts;</LI> 

                                  <LI>Research, write and distribute all PR and supporting material;</LI> 

                                  <LI>Proactively pitch news and articles to the press; work closely with product managers to develop consistent key messages.</LI> 

                            <LI>Help develop and manage PR budget.</LI>  

                           </UL>

                     </EssentialFunctions>

                     <CompensationDescription>  

                           <Pay> 

                                  <SalaryAnnual currency =

"USD">$45,000</SalaryAnnual>  

                           </Pay>  

                           <BenefitsDescription> 

                                  <P>An attractive benefit package,

including:</P> 

                                  <UL>

                                         <LI>Dental</LI>

                                         <LI>Medical</LI>

                                         <LI>401(k)</LI>

                                         <LI>Dependent care</LI> 

                                  </UL>  

                           </BenefitsDescription>  

                           <SummaryText>You'll make a

mint!</SummaryText>

                     </CompensationDescription> 

              </JobPositionDescription> 

              <JobPositionRequirements>

                     <QualificationsRequired>  

                           <Qualification type = "skill" yearsOfExperience = "2" level = "4" interest = "3">Powerpoint</Qualification>  

                           <Qualification type = "skill" yearsOfExperience = "1" level = "3" interest = "3">MS FrontPage</Qualification>  

                            <Qualification type = "education">This position requires at least a BA or  BS in CS or equivalent experience.</Qualification>  

                           <Qualification type = "experience" yearsOfExperience = "3" level = "5" interest = "4">Minimum 3 years experience in public relations.</Qualification>

                     </QualificationsRequired> 

              </JobPositionRequirements>  

       </JobPositionInformation>  

       <HowToApply distribute = "internal"> 

              <ApplicationMethods>

                     <InPerson>  

                           <SummaryText>Qualified candidates are encouraged to apply at Goodcompany's HR office.</SummaryText>

                     </InPerson> 

              </ApplicationMethods>  

       </HowToApply>  

       <HowToApply distribute = "external"> 

              <ApplicationMethods>

                     <ByEmail>  

                           <SummaryText>Qualified candidates should submit their resumes via e-mail (in MSWord format) to Jane Mangler at

                      <Link mailTo = "jmangler@goodcompany.com">[email protected]</Link>.

                      </SummaryText>

                     </ByEmail> 

              </ApplicationMethods>  

       </HowToApply>

</JobPositionPosting>

 

The following is the XML Schema file generated using XMLSpy to validate the above XML File.

Below XML Schema defines the elements, attributes with datatypes and in what structure it should be. The above XML file i.e, the JobPositionPosting-1_1.xml is for one open position and for a particular Hiring Organization. And the XML Schema is not meant to validate only JobPositionPosting-1_1.xml file alone. The contents in the XML file can vary but the structure will be based on the following schema, otherwise if the .xml file is in someother format, the below .xsd file (Schema file’s extension) will not validate and will reject that file.

 

JobPositionPosting-1_1.xsd

<?xml version="1.0" encoding="UTF-8"?>

<!--W3C Schema generated by XML Spy v4.0.1 U (http://www.xmlspy.com)-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

       <xs:element name="AddressLine" type="xs:string"/>

       <xs:element name="ApplicationMethods">

              <xs:complexType>

                     <xs:choice>

                           <xs:element ref="InPerson"/>

                           <xs:element ref="ByEmail"/>

                     </xs:choice>

              </xs:complexType>

       </xs:element>

       <xs:element name="BenefitsDescription">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="P"/>

                           <xs:element ref="UL"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="ByEmail">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="SummaryText"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="Classification">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="DirectHireOrContract"/>

                           <xs:element ref="Duration"/>

                     </xs:sequence>

                     <xs:attribute name="distribute" type="xs:string" use="required"/>

              </xs:complexType>

       </xs:element>

       <xs:element name="CompensationDescription">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="Pay"/>

                           <xs:element ref="BenefitsDescription"/>

                           <xs:element ref="SummaryText"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="Contact">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="PersonName"/>

                           <xs:element ref="PositionTitle"/>

                           <xs:element ref="PostalAddress"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="Contract">

              <xs:complexType/>

       </xs:element>

       <xs:element name="CountryCode" type="xs:string"/>

       <xs:element name="DeliveryAddress">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="AddressLine" maxOccurs="unbounded"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="DirectHireOrContract">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="Contract"/>

                           <xs:element ref="SummaryText"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="Duration">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="Temporary"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="EssentialFunctions">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="UL"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="FamilyName">

              <xs:complexType>

                     <xs:simpleContent>

                           <xs:restriction base="xs:string">

                                  <xs:attribute name="primary" type="xs:string" use="required"/>

                           </xs:restriction>

                     </xs:simpleContent>

              </xs:complexType>

       </xs:element>

       <xs:element name="GivenName" type="xs:string"/>

       <xs:element name="HiringOrg">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="HiringOrgName"/>

                           <xs:element ref="WebSite"/>

                           <xs:element ref="Industry"/>

                           <xs:element ref="Contact"/>

                     </xs:sequence>

                     <xs:attribute name="type" type="xs:string" use="required"/>

              </xs:complexType>

       </xs:element>

       <xs:element name="HiringOrgName" type="xs:string"/>

       <xs:element name="HowToApply">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="ApplicationMethods"/>

                     </xs:sequence>

                     <xs:attribute name="distribute" use="required">

                        <xs:simpleType>

                           <xs:restriction base="xs:NMTOKEN">

                                  <xs:enumeration value="external"/>

                                  <xs:enumeration value="internal"/>

                           </xs:restriction>

                        </xs:simpleType>

                     </xs:attribute>

              </xs:complexType>

       </xs:element>

       <xs:element name="InPerson">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="SummaryText"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="Industry">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="SummaryText"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="JobPositionDescription">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="Classification"/>

                           <xs:element ref="EssentialFunctions"/>

                           <xs:element ref="CompensationDescription"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="JobPositionInformation">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="JobPositionTitle"/>

                           <xs:element ref="JobPositionDescription"/>

                           <xs:element ref="JobPositionRequirements"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="JobPositionPosting">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="JobPositionPostingId"/>

                           <xs:element ref="HiringOrg"/>

                           <xs:element ref="JobPositionInformation"/>

                            <xs:element ref="HowToApply" maxOccurs="unbounded"/>

                     </xs:sequence>

                     <xs:attribute name="status" type="xs:string" use="required"/>

              </xs:complexType>

       </xs:element>

       <xs:element name="JobPositionPostingId" type="xs:long"/>

       <xs:element name="JobPositionRequirements">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="QualificationsRequired"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="JobPositionTitle" type="xs:string"/>

       <xs:element name="LI" type="xs:string"/>

       <xs:element name="Link">

              <xs:complexType>

                     <xs:simpleContent>

                           <xs:restriction base="xs:string">

                                  <xs:attribute name="mailTo" type="xs:string" use="required"/>

                           </xs:restriction>

                     </xs:simpleContent>

              </xs:complexType>

       </xs:element>

       <xs:element name="Municipality" type="xs:string"/>

       <xs:element name="P" type="xs:string"/>

       <xs:element name="Pay">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="SalaryAnnual"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="PersonName">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="GivenName"/>

                           <xs:element ref="FamilyName"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="PositionTitle" type="xs:string"/>

       <xs:element name="PostalAddress">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="CountryCode"/>

                           <xs:element ref="PostalCode"/>

                           <xs:element ref="Region"/>

                           <xs:element ref="Municipality"/>

                           <xs:element ref="DeliveryAddress"/>

                     </xs:sequence>

                     <xs:attribute name="type" type="xs:string" use="required"/>

              </xs:complexType>

       </xs:element>

       <xs:element name="PostalCode" type="xs:short"/>

<xs:element name="Qualification">

         <xs:complexType>

              <xs:simpleContent>

                     <xs:restriction base="xs:string">

                           <xs:attribute name="type" use="required">

                              <xs:simpleType>

                                <xs:restriction base="xs:NMTOKEN">

                                  <xs:enumeration value="education"/>

                                  <xs:enumeration value="experience"/>

                                  <xs:enumeration value="skill"/>

                                </xs:restriction>

                              </xs:simpleType>

                           </xs:attribute>

                            <xs:attribute name="yearsOfExperience">

                               <xs:simpleType>

                                  <xs:restriction case="xs:NMTOKEN">

                                         <xs:enumeration value="1"/>

                                         <xs:enumeration value="2"/>

                                         <xs:enumeration value="3"/>

                                  </xs:restriction>

                              </xs:simpleType>

                           </xs:attribute>

                           <xs:attribute name="level">

                             <xs:simpleType>

                                  <xs:restriction base="xs:NMTOKEN">

                                         <xs:enumeration value="3"/>

                                         <xs:enumeration value="4"/>

                                         <xs:enumeration value="5"/>

                                  </xs:restriction>

                             </xs:simpleType>

                          </xs:attribute>

                          <xs:attribute name="interest">

                             <xs:simpleType>

                                  <xs:restriction base="xs:NMTOKEN">

                                         <xs:enumeration value="3"/>

                                         <xs:enumeration value="4"/>

                                  </xs:restriction>

                            </xs:simpleType>

                         </xs:attribute>

               </xs:restriction>

       </xs:simpleContent>

  </xs:complexType>

</xs:element>

       <xs:element name="QualificationsRequired">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="Qualification" maxOccurs="unbounded"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="Region" type="xs:string"/>

       <xs:element name="SalaryAnnual">

              <xs:complexType>

                     <xs:simpleContent>

                           <xs:restriction base="xs:string">

                                  <xs:attribute name="currency" type="xs:string" use="required"/>

                           </xs:restriction>

                     </xs:simpleContent>

              </xs:complexType>

       </xs:element>

       <xs:element name="SummaryText">

              <xs:complexType mixed="true">

                     <xs:choice minOccurs="0" maxOccurs="unbounded">

                           <xs:element ref="Link"/>

                     </xs:choice>

              </xs:complexType>

       </xs:element>

       <xs:element name="Temporary">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="TermLength"/>

                           <xs:element ref="SummaryText"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="TermLength" type="xs:string"/>

       <xs:element name="UL">

              <xs:complexType>

                     <xs:sequence>

                           <xs:element ref="LI" maxOccurs="unbounded"/>

                     </xs:sequence>

              </xs:complexType>

       </xs:element>

       <xs:element name="WebSite" type="xs:anyURI"/>

</xs:schema>

Note:

Apart from discussing the primary components one by one, you can also see small descriptions about other elements/datatypes used along with them. This is to save your time and not to make you search surfing the pages.


goto Page 2

  Contact Us |  | Site Guide | About PerfectXML | Advertise ©2004 perfectxml.com. All rights reserved. | Privacy