SlideShare uma empresa Scribd logo
1 de 46
Baixar para ler offline
<?xml version=„1.0‟ encoding=“UTF-8”?>

<!-- Human Resource data-->

<HumanResource>

  <!-- Information for a person-->
  <Person id=„1‟ slary=“500”>
     <FirstName>John</FirstName>
     <MidName></MidName>
     <LastName>Doe</LastName>
     <Position>Manager</Position>
  </Person>
</HumanResource>
                                         Document Type
<?xml version=”1.0”?>
<?xml version=”1.0”?>   <schema xmlns=”http://www.w3.org/2001/XMLSchema”
<name>                  xmlns:target=”http://www.exam.com/name”
                        targetNamespace=”http://www.exam.com/name”
     <first>            elementFormDefault=”qualified”>
          John
     </first>           <element name=”name”>
                           <complexType>
     <middle>                 <sequence>
          Johansen                    <element name=”first” type=”string”/>
     </middle>                        <element name=”middle” type=”string”/>
                                      <element name=”last” type=”string”/>
     <last>                   </sequence>
          Doe              </complexType>
     </last>            </element>
</name>
                        </schema>
<rootElement
     xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
     xsi:schemaLocation=“list of namespace-location pairs”

     >
</rootElement>
<rootElement
     xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”

     xsi:noNamespaceSchemaLocation=“location”
     >
</rootElement>
<?xml version=”1.0”?>
<?xml version=”1.0”?>   <schema xmlns=”http://www.w3.org/2001/XMLSchema”
<name>                  xmlns:target=”http://www.exam.com/name”
                        targetNamespace=”http://www.exam.com/name”
     <first>            elementFormDefault=”qualified”>
          John
     </first>           <element name=”name”>
                           <complexType>
     <middle>                 <sequence>
          Johansen                    <element name=”first” type=”string”/>
     </middle>                        <element name=”middle” type=”string”/>
                                      <element name=”last” type=”string”/>
     <last>                   </sequence>
          Doe              </complexType>
     </last>            </element>
</name>
                        </schema>
<schema
     targetNamespace=“URI”
     attributeFormDefault=“qualified or unqualified”
     elementFormDefault=“qualified or unqualified”
     version=“version number”>
</schema>


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


<xs:schema xmlns:xs=”http://www.w3.org/2001/XMLSchema”>

<xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<element
     name=”name of the element”
     type=”global type”
     ref=”global element declaration”
     form=”qualified or unqualified”
     minOccurs=”non negative number”
     maxOccurs=”non negative number or „unbounded‟”
     default=”default value”
     fixed=”fixed value”>
<element
     name=”name of the element”
     type=”global type”
     ref=”global element declaration”
     form=”qualified or unqualified”
     minOccurs=”non negative number”
     maxOccurs=”non negative number or „unbounded‟”
     default=”default value”
     fixed=”fixed value”>
<phone>043678002</phone>

birthday=“02-10-2011”
<simpleType
     name=”name of the simpleType”
     final=”#all or list or union or restriction”>
<restriction
base=”name of the simpleType you are deriving from”>
Facet            Description
minExclusive     Allows you to specify the minimum value for your type that excludes the value you specify
minInclusive     Allows you to specify the minimum value for your type that includes the value you specify
maxExclusive     Allows you to specify the maximum value for your type that excludes the value you specify
maxInclusive     Allows you to specify the maximum value for your type that includes the value you specify
totalDigits      Allows you to specify the total number of digits in a numeric type
fractionDigits   Allows you to specify the number of fractional digits in a numeric type
length           Allows you to specify the number of items in a list type or the number of characters in a string type
minLength        Allows you to specify the minimum number of items in a list type or the minimum number of
                 characters in a string type
maxLength        Allows you to specify the maximum number of items in a list type or the maximum number of
                 characters in a string type
enumeration      Allows you to specify an allowable value in an enumerated list
whitespace       Allows you to specify how whitespace should be treated within the type
pattern          Allows you to restrict string types using regular expressions
<simpleType name="myIntegerType">
   <restriction base="integer">
       <minInclusive value="10000"/>
       <maxInclusive value="99999"/>
   </restriction>
</simpleType>
<simpleType
   name="stockKeepingUnitType">
   <restriction base="string">
   <pattern value="d{3}-[A-Z]{2}"/>
   </restriction>
</simpleType>
<simpleType name=“phoneType”>
  <restriction base=”string”>
    <enumeration value=”Home”/>
    <enumeration value=”Work”/>
    <enumeration value=”Cell”/>
    <enumeration value=”Fax”/>
  </restriction>
</simpleType>
<list
itemType=”name of simpleType used for validating items in the list”>

  <simpleType name=”phoneListType”>
    <list itemType=”exam:phoneType”/>
  </simpleType>
<union
     memberTypes=”whitespace separated list of types”>
<simpleType name=”UnknownString”>
  <restriction base=”string”>
      <enumeration value=”Unknown”/>
  </restriction>
</simpleType>


<simpleType name=”UnknownOrFloatType”>
  <union memberTypes=”float exam:UnknownString”/>
</simpleType>
content model
        attribute list
<element name=”name”>
                              <complexType>
                                 <sequence>
                                 <element name=”first” type=”string”/>
                                 <element name=”middle” type=”string”/>
<phone>043678002</phone>
                                 <element name=”last” type=”string”/>
                                 </sequence>
                                 <attribute name=”title” type=”string”/>
                              </complexType>
                           </element>
<sequence>
      <element name=”first” type=”string”/>
      <element name=”middle” type=”string”/>
      <element name=”last” type=”string”/>
</sequence>



<!ELEMENT name (first, middle, last)>
<choice>
      <element name=”first” type=”string”/>
      <element name=”middle” type=”string”/>
      <element name=”last” type=”string”/>
</choice>



<!ELEMENT name (first| middle| last)>
<group name=”NameGroup”>
   <sequence>
      <element name=”first” type=”string”/>
      <element name=”middle” type=”string”/>
      <element name=”last” type=”string”/>
   </sequence>
</group>

<element name=”name”>
   <complexType>
      <group ref=”target:NameGroup”/>
      <attribute name=”title” type=”string”/>
   </complexType>
</element>
<complexType name="mixedType" mixed="true">
      <choice maxOccurs="unbounded" minOccurs="0">
            <element name=“b" type="string"/>
            <element name="i" type="string"/>
            <element name="u" type="string"/>
      </choice>
      <attribute ref="class"/>
</complexType>



<!ELEMENT description (#PCDATA | b | i | u)*>
<element name=“br”>
      <complexType>
            <attribute name=”title” type=”string”/>
      <complexType>
</element>


<!ELEMENT br EMPTY>
<all>
      <element name=”first” type=”string”/>
      <element name=”middle” type=”string”/>
      <element name=”last” type=”string”/>
</all>
<attribute
     name=”name of the attribute”
     type=”global type”
     ref=”global attribute declaration”
     form=”qualified or unqualified”
     use=”optional or prohibited or required”
     default=”default value”
     fixed=”fixed value”>
<attribute name=”title”>
  <simpleType>
  <!-- type information -->
  </simpleType>
</attribute>




<attribute name=”title” type=”string”/>
<attributeGroup name=”ContactsAttributes”>
     <!-- attribute declarations go here -->
</attributeGroup>

   attributGroups may not recursively refer to themselves
<attributeGroup name=”AttGroup1”>
      <attributeGroup ref=”target:AttGroup1”/>
</attributeGroup >
<attributeGroup name=”AttGroup1”>
      <attributeGroup ref=”target:AttGroup2”/>
</attributeGroup >
<attributeGroup name=”AttGroup2”>
      <attributeGroup ref=”target:AttGroup1”/>
</attributeGroup >
<import
     namespace=””
     schemaLocation=””>




<import
     namespace=”http://www.example.com/name”
     schemaLocation=”name8.xsd”/>
<include
     schemaLocation=””>




<include
     schemaLocation=”contact_tags.xsd”/>
XML Schemas

Mais conteúdo relacionado

Mais procurados

Ex[1].3 php db connectivity
Ex[1].3 php db connectivityEx[1].3 php db connectivity
Ex[1].3 php db connectivity
Mouli Chandira
 

Mais procurados (20)

Ex[1].3 php db connectivity
Ex[1].3 php db connectivityEx[1].3 php db connectivity
Ex[1].3 php db connectivity
 
Intro to Jinja2 Templates - San Francisco Flask Meetup
Intro to Jinja2 Templates - San Francisco Flask MeetupIntro to Jinja2 Templates - San Francisco Flask Meetup
Intro to Jinja2 Templates - San Francisco Flask Meetup
 
XSD Incomplete Overview Draft
XSD Incomplete Overview DraftXSD Incomplete Overview Draft
XSD Incomplete Overview Draft
 
Xml part1
Xml part1  Xml part1
Xml part1
 
XSLT
XSLTXSLT
XSLT
 
Week 12 code
Week 12 codeWeek 12 code
Week 12 code
 
Building Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScriptBuilding Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScript
 
Mysql & Php
Mysql & PhpMysql & Php
Mysql & Php
 
Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016Hacking Your Way To Better Security - php[tek] 2016
Hacking Your Way To Better Security - php[tek] 2016
 
jQuery Selectors
jQuery SelectorsjQuery Selectors
jQuery Selectors
 
Sequel @ madrid-rb
Sequel @  madrid-rbSequel @  madrid-rb
Sequel @ madrid-rb
 
Python Templating Engine - Intro to Jinja
Python Templating Engine - Intro to JinjaPython Templating Engine - Intro to Jinja
Python Templating Engine - Intro to Jinja
 
J query lecture 1
J query lecture 1J query lecture 1
J query lecture 1
 
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Hacking Your Way To Better Security - DrupalCon Baltimore 2017Hacking Your Way To Better Security - DrupalCon Baltimore 2017
Hacking Your Way To Better Security - DrupalCon Baltimore 2017
 
Xml and xslt
Xml and xsltXml and xslt
Xml and xslt
 
Web Service Workshop - 3 days
Web Service Workshop - 3 daysWeb Service Workshop - 3 days
Web Service Workshop - 3 days
 
jrubykaigi2010-lt-rubeus
jrubykaigi2010-lt-rubeusjrubykaigi2010-lt-rubeus
jrubykaigi2010-lt-rubeus
 
Web 6 | JavaScript DOM
Web 6 | JavaScript DOMWeb 6 | JavaScript DOM
Web 6 | JavaScript DOM
 
Library Project Marcelo Salvador
Library Project Marcelo SalvadorLibrary Project Marcelo Salvador
Library Project Marcelo Salvador
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
 

Semelhante a XML Schemas

[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
Donghyeok Kang
 
C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample Php
JH Lee
 
IQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML SchemaIQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML Schema
Ted Leung
 

Semelhante a XML Schemas (20)

[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Links/Деловой и денежный мир
Links/Деловой и денежный мирLinks/Деловой и денежный мир
Links/Деловой и денежный мир
 
Service Oriented Architecture-Unit-1-XML Schema
Service Oriented Architecture-Unit-1-XML SchemaService Oriented Architecture-Unit-1-XML Schema
Service Oriented Architecture-Unit-1-XML Schema
 
Solr Anti-Patterns: Presented by Rafał Kuć, Sematext
Solr Anti-Patterns: Presented by Rafał Kuć, SematextSolr Anti-Patterns: Presented by Rafał Kuć, Sematext
Solr Anti-Patterns: Presented by Rafał Kuć, Sematext
 
XML Support: Specifications and Development
XML Support: Specifications and DevelopmentXML Support: Specifications and Development
XML Support: Specifications and Development
 
Apache Solr Search Mastery
Apache Solr Search MasteryApache Solr Search Mastery
Apache Solr Search Mastery
 
ALPHA Script - XML Model
ALPHA Script - XML ModelALPHA Script - XML Model
ALPHA Script - XML Model
 
Frfrfrf
FrfrfrfFrfrfrf
Frfrfrf
 
Schematron
SchematronSchematron
Schematron
 
Three tier application
Three tier applicationThree tier application
Three tier application
 
The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup language
 
C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample Php
 
Going with style: Themes and apps for Magento Go
Going with style: Themes and apps for Magento GoGoing with style: Themes and apps for Magento Go
Going with style: Themes and apps for Magento Go
 
Practica n° 7
Practica n° 7Practica n° 7
Practica n° 7
 
New text document
New text documentNew text document
New text document
 
IQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML SchemaIQPC Canada XML 2001: How to develop Syntax and XML Schema
IQPC Canada XML 2001: How to develop Syntax and XML Schema
 
Html To JSP
Html To JSPHtml To JSP
Html To JSP
 
Zencoding cheatsheet, ayuda Memoria
Zencoding cheatsheet, ayuda MemoriaZencoding cheatsheet, ayuda Memoria
Zencoding cheatsheet, ayuda Memoria
 
Zen Coding Cheat Sheet
Zen Coding Cheat SheetZen Coding Cheat Sheet
Zen Coding Cheat Sheet
 

Mais de Hoang Nguyen

SOME SECURITY CHALLENGES IN CLOUD COMPUTING
SOME SECURITY CHALLENGES  IN CLOUD COMPUTINGSOME SECURITY CHALLENGES  IN CLOUD COMPUTING
SOME SECURITY CHALLENGES IN CLOUD COMPUTING
Hoang Nguyen
 
Multiple processor systems
Multiple processor systemsMultiple processor systems
Multiple processor systems
Hoang Nguyen
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
Hoang Nguyen
 

Mais de Hoang Nguyen (20)

GANs and Applications
GANs and ApplicationsGANs and Applications
GANs and Applications
 
Scrum - An introduction
Scrum - An introductionScrum - An introduction
Scrum - An introduction
 
ORM in Django
ORM in DjangoORM in Django
ORM in Django
 
Introduction to Cross-platform App Development
Introduction to Cross-platform App DevelopmentIntroduction to Cross-platform App Development
Introduction to Cross-platform App Development
 
Conistency of random forests
Conistency of random forestsConistency of random forests
Conistency of random forests
 
Trust - Digital Signature
Trust - Digital SignatureTrust - Digital Signature
Trust - Digital Signature
 
Key Exchange
Key ExchangeKey Exchange
Key Exchange
 
SOME SECURITY CHALLENGES IN CLOUD COMPUTING
SOME SECURITY CHALLENGES  IN CLOUD COMPUTINGSOME SECURITY CHALLENGES  IN CLOUD COMPUTING
SOME SECURITY CHALLENGES IN CLOUD COMPUTING
 
Stream ciphers
Stream ciphersStream ciphers
Stream ciphers
 
Classical ciphers
Classical ciphersClassical ciphers
Classical ciphers
 
Confidentiality
ConfidentialityConfidentiality
Confidentiality
 
Information, Data and Decision Making
Information, Data and Decision MakingInformation, Data and Decision Making
Information, Data and Decision Making
 
Multiple processor systems
Multiple processor systemsMultiple processor systems
Multiple processor systems
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
Introduction to AOS course
Introduction to AOS courseIntroduction to AOS course
Introduction to AOS course
 
Background Knowledge
Background KnowledgeBackground Knowledge
Background Knowledge
 
Introduction to Information Security Course
Introduction to Information Security CourseIntroduction to Information Security Course
Introduction to Information Security Course
 
Introduction to CNS Course
Introduction to CNS CourseIntroduction to CNS Course
Introduction to CNS Course
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
Nosql intro
Nosql introNosql intro
Nosql intro
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

XML Schemas

  • 1.
  • 2. <?xml version=„1.0‟ encoding=“UTF-8”?> <!-- Human Resource data--> <HumanResource> <!-- Information for a person--> <Person id=„1‟ slary=“500”> <FirstName>John</FirstName> <MidName></MidName> <LastName>Doe</LastName> <Position>Manager</Position> </Person> </HumanResource> Document Type
  • 3.
  • 4.
  • 5.
  • 6. <?xml version=”1.0”?> <?xml version=”1.0”?> <schema xmlns=”http://www.w3.org/2001/XMLSchema” <name> xmlns:target=”http://www.exam.com/name” targetNamespace=”http://www.exam.com/name” <first> elementFormDefault=”qualified”> John </first> <element name=”name”> <complexType> <middle> <sequence> Johansen <element name=”first” type=”string”/> </middle> <element name=”middle” type=”string”/> <element name=”last” type=”string”/> <last> </sequence> Doe </complexType> </last> </element> </name> </schema>
  • 7. <rootElement xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“list of namespace-location pairs” > </rootElement>
  • 8. <rootElement xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=“location” > </rootElement>
  • 9. <?xml version=”1.0”?> <?xml version=”1.0”?> <schema xmlns=”http://www.w3.org/2001/XMLSchema” <name> xmlns:target=”http://www.exam.com/name” targetNamespace=”http://www.exam.com/name” <first> elementFormDefault=”qualified”> John </first> <element name=”name”> <complexType> <middle> <sequence> Johansen <element name=”first” type=”string”/> </middle> <element name=”middle” type=”string”/> <element name=”last” type=”string”/> <last> </sequence> Doe </complexType> </last> </element> </name> </schema>
  • 10. <schema targetNamespace=“URI” attributeFormDefault=“qualified or unqualified” elementFormDefault=“qualified or unqualified” version=“version number”> </schema> <schema xmlns=”http://www.w3.org/2001/XMLSchema”> <xs:schema xmlns:xs=”http://www.w3.org/2001/XMLSchema”> <xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
  • 11. <element name=”name of the element” type=”global type” ref=”global element declaration” form=”qualified or unqualified” minOccurs=”non negative number” maxOccurs=”non negative number or „unbounded‟” default=”default value” fixed=”fixed value”>
  • 12. <element name=”name of the element” type=”global type” ref=”global element declaration” form=”qualified or unqualified” minOccurs=”non negative number” maxOccurs=”non negative number or „unbounded‟” default=”default value” fixed=”fixed value”>
  • 13.
  • 14.
  • 15.
  • 17. <simpleType name=”name of the simpleType” final=”#all or list or union or restriction”>
  • 18. <restriction base=”name of the simpleType you are deriving from”>
  • 19.
  • 20. Facet Description minExclusive Allows you to specify the minimum value for your type that excludes the value you specify minInclusive Allows you to specify the minimum value for your type that includes the value you specify maxExclusive Allows you to specify the maximum value for your type that excludes the value you specify maxInclusive Allows you to specify the maximum value for your type that includes the value you specify totalDigits Allows you to specify the total number of digits in a numeric type fractionDigits Allows you to specify the number of fractional digits in a numeric type length Allows you to specify the number of items in a list type or the number of characters in a string type minLength Allows you to specify the minimum number of items in a list type or the minimum number of characters in a string type maxLength Allows you to specify the maximum number of items in a list type or the maximum number of characters in a string type enumeration Allows you to specify an allowable value in an enumerated list whitespace Allows you to specify how whitespace should be treated within the type pattern Allows you to restrict string types using regular expressions
  • 21. <simpleType name="myIntegerType"> <restriction base="integer"> <minInclusive value="10000"/> <maxInclusive value="99999"/> </restriction> </simpleType>
  • 22. <simpleType name="stockKeepingUnitType"> <restriction base="string"> <pattern value="d{3}-[A-Z]{2}"/> </restriction> </simpleType>
  • 23. <simpleType name=“phoneType”> <restriction base=”string”> <enumeration value=”Home”/> <enumeration value=”Work”/> <enumeration value=”Cell”/> <enumeration value=”Fax”/> </restriction> </simpleType>
  • 24. <list itemType=”name of simpleType used for validating items in the list”> <simpleType name=”phoneListType”> <list itemType=”exam:phoneType”/> </simpleType>
  • 25. <union memberTypes=”whitespace separated list of types”>
  • 26. <simpleType name=”UnknownString”> <restriction base=”string”> <enumeration value=”Unknown”/> </restriction> </simpleType> <simpleType name=”UnknownOrFloatType”> <union memberTypes=”float exam:UnknownString”/> </simpleType>
  • 27.
  • 28. content model attribute list
  • 29. <element name=”name”> <complexType> <sequence> <element name=”first” type=”string”/> <element name=”middle” type=”string”/> <phone>043678002</phone> <element name=”last” type=”string”/> </sequence> <attribute name=”title” type=”string”/> </complexType> </element>
  • 30.
  • 31.
  • 32. <sequence> <element name=”first” type=”string”/> <element name=”middle” type=”string”/> <element name=”last” type=”string”/> </sequence> <!ELEMENT name (first, middle, last)>
  • 33. <choice> <element name=”first” type=”string”/> <element name=”middle” type=”string”/> <element name=”last” type=”string”/> </choice> <!ELEMENT name (first| middle| last)>
  • 34.
  • 35. <group name=”NameGroup”> <sequence> <element name=”first” type=”string”/> <element name=”middle” type=”string”/> <element name=”last” type=”string”/> </sequence> </group> <element name=”name”> <complexType> <group ref=”target:NameGroup”/> <attribute name=”title” type=”string”/> </complexType> </element>
  • 36. <complexType name="mixedType" mixed="true"> <choice maxOccurs="unbounded" minOccurs="0"> <element name=“b" type="string"/> <element name="i" type="string"/> <element name="u" type="string"/> </choice> <attribute ref="class"/> </complexType> <!ELEMENT description (#PCDATA | b | i | u)*>
  • 37. <element name=“br”> <complexType> <attribute name=”title” type=”string”/> <complexType> </element> <!ELEMENT br EMPTY>
  • 38. <all> <element name=”first” type=”string”/> <element name=”middle” type=”string”/> <element name=”last” type=”string”/> </all>
  • 39.
  • 40. <attribute name=”name of the attribute” type=”global type” ref=”global attribute declaration” form=”qualified or unqualified” use=”optional or prohibited or required” default=”default value” fixed=”fixed value”>
  • 41. <attribute name=”title”> <simpleType> <!-- type information --> </simpleType> </attribute> <attribute name=”title” type=”string”/>
  • 42. <attributeGroup name=”ContactsAttributes”> <!-- attribute declarations go here --> </attributeGroup>  attributGroups may not recursively refer to themselves <attributeGroup name=”AttGroup1”> <attributeGroup ref=”target:AttGroup1”/> </attributeGroup > <attributeGroup name=”AttGroup1”> <attributeGroup ref=”target:AttGroup2”/> </attributeGroup > <attributeGroup name=”AttGroup2”> <attributeGroup ref=”target:AttGroup1”/> </attributeGroup >
  • 43.
  • 44. <import namespace=”” schemaLocation=””> <import namespace=”http://www.example.com/name” schemaLocation=”name8.xsd”/>
  • 45. <include schemaLocation=””> <include schemaLocation=”contact_tags.xsd”/>