SlideShare a Scribd company logo
Date: 11.07.2019
Recap
• DTD attributes
• Attributes type
• Default attribute value
• DTD Entities
• Internal entities
• External entities
• Pre-defined entities
• External Entities
• Parameter entities
XML schema
• An XML schema is used to define the structure
of an XML document.
• It is like DTD but provides more control on XML
structure.
• The XML Schema language is referred to as XML
Schema Definition (XSD)
• XML Schema Definition Language at
http://www.w3c.org/XML/Schema.
Contactlist.xsd
• <?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name=“contactlist">
<xs:complexType>
<xs:sequence>
<xs:element name=“fullname" type="xs:string"/>
<xs:element name=“address" type="xs:string"/>
<xs:element name=“phone" type="xs:string"/>
<xs:element name=“email" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
PurchaseOrder.xml Contains a Sample Purchase Order
for Common Items found in a Grocery Store
<PurchaseOrder Tax=”5.76” Total=”75.77”>
<ShippingInformation>
<Name>Dillon Larsen</Name>
<Address>
<Street>123 Jones Rd.</Street>
<City>Houston</City>
<State>TX</State>
<Zip>77381</Zip>
</Address>
<Method>USPS</Method>
<DeliveryDate>2001-08-12</DeliveryDate>
</ShippingInformation>
PurchaseOrder.xml
<BillingInformation>
<Name>Madi Larsen</Name>
<Address>
<Street>123 Jones Rd.</Street>
<City>Houston</City>
<State>TX</State>
<Zip>77381</Zip>
</Address>
<PaymentMethod>Credit card</PaymentMethod>
<BillingDate>2001-08-09</BillingDate>
</BillingInformation>
<Order SubTotal=”70.01” ItemsSold=”17”>
<Product Name=”Baby Swiss” Id=”702890”
Price=”2.89” Quantity=”1”/>
<Product Name=”Hard Salami” Id=”302340”
Price=”2.34” Quantity=”1”/>
</Order>
</PurchaseOrder>
• Declaring Attributes
– Attributes provide additional information to
elements.
– To indicate that a complex element has an
attribute, use the <attribute> element of the XML
Schema Definition Language.
<xs:element name=“fullname" type="xs:string"/>
<xsd:complexType name=”ProductType”>
<xsd:attribute name=”Name” type=”xsd:string”/>
<xsd:attribute name=”Id” type=”xsd:positiveInteger”/>
<xsd:attribute name=”Price”>
<xsd:simpleType>
<xsd:restriction base=”xsd:decimal”>
<xsd:fractionDigits value=”2”/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name=”Quantity” type=”xsd:positiveInteger”/>
</xsd:complexType>
primitive data type• anyURI
• base64Binary
• Boolean
• date
• dateTime
• decimal
• double
• duration
• Float
• gDay
• gMonth
• gMonthDay
• gYear
• gYearMonth
• hexBinary
• NOTATION
• Qname
• string
• time
Derived data type
• Byte
• ENTITIES
• ENTITY
• ID
• IDREF
• IDREFS
• int
• integer
• language
• long
• Name
• Declaring Elements
– Elements within an XML schema can be declared using the
<element> element from the XML Schema Definition
Language.
• Syntax
<element name=”” [type=””] [abstract=””] [block=””]
[default=””] [final=””] [fixed=””] [minOccurs=””]
[maxOccurs=””] [nillable=””] [ref=””] [substitutionGroup=””]/
– The abstract attribute indicates whether the element
being declared may show up directly within the XML
document
– this element must be referenced by another element using
the substitutionGroup attribute.
<xsd:element name=’PurchaseOrder’
type=’PurchaseOrderType’/>
<xsd:complexType name=”PurchaseOrderType”>
<xsd:all>
<xsd:element name=”ShippingInformation”
type=”InfoType” minOccurs=”1” maxOccurs=”1”/>
<xsd:element name=”BillingInformation”
type=”InfoType” minOccurs=”1” maxOccurs=”1”/>
<xsd:element name=”Order” type=”OrderType”
minOccurs=”1” maxOccurs=”1”/>
</xsd:all>
the child elements can appear in any order
• Declaring Complex Elements
– <complexType> element is used to define an element that contain
child elements and/or attributes.
<xsd:complexType name=’’ [abstract=’’] [base=’’] [block=’’] [final=’’]
[mixed=’’]/>
• The abstract attribute indicates whether an element may define its content
directly from this type definition
– If this attribute is true, an element must define its content from a
derived type definition.
– If this attribute is omitted or its value is false, an element may define its
content directly based on this type definition.
• The base attribute specifies the data type for the element.
• The block attribute indicates what types of derivation are prevented for this
element definition. This attribute can contain any of the following values:
– all
– extension
– restriction
Ex:Complex Elements
<xsd:element name=’PurchaseOrder’
type=’PurchaseOrderType’/>
<xsd:complexType name=”PurchaseOrderType”>
<xsd:all>
<xsd:element name=”ShippingInformation”
type=”InfoType” minOccurs=”1” maxOccurs=”1”/>
<xsd:element name=”BillingInformation”
type=”InfoType” minOccurs=”1” maxOccurs=”1”/>
<xsd:element name=”Order” type=”OrderType”
minOccurs=”1” maxOccurs=”1”/>
</xsd:all>
• Declaring Simple Types
– It is used to define single element in an XML
scheme
– Syntax
<xsd:simpleType name=’’>
<xsd:restriction base=’’/>
</xsd:simpleType>
<xsd:attribute name=”Price”>
<xsd:simpleType>
<xsd:restriction base=”xsd:decimal”>
<xsd:fractionDigits value=”2”/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
• Refining Simple Types Using Facets
– Facets give greater control over the definition of elements
and attributes.
– A facet can only be specified for a <simpleType> element,
and it helps determine the set of values for a <simpleType>
element.
• enumeration
• fractionDigits
• length
• maxExclusive
• maxInclusive
• maxLength
• minExclusive
• minInclusive
• minLength
• pattern
<xsd:simpleType name=”PaymentMethodType”>
<xsd:restriction base=”xsd:string”>
<xsd:enumeration value=”Check”/>
<xsd:enumeration value=”Cash”/>
<xsd:enumeration value=”Credit Card”/>
<xsd:enumeration value=”Debit Card”/>
<xsd:enumeration value=”Other”/>
</xsd:restriction>
</xsd:simpleType>
< xsd:enumeration > facet
The <fractionDigits> facet specifies the maximum number of
decimal digits in the fractional part.
<xsd:attribute name=”SubTotal”>
<xsd:simpleType>
<xsd:restriction base=”xsd:decimal”>
<xsd:fractionDigits value=”2”/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
The <length> facet determines the number of
units of length for the specified data type
<xsd:simpleType name=”StateType”>
<xsd:restriction base=”xsd:string”>
<xsd:length value=”2”/>
<xsd:enumeration value=”AR”/>
<xsd:enumeration value=”LA”/>
<xsd:enumeration value=”MS”/>
<xsd:enumeration value=”OK”/>
<xsd:enumeration value=”TX”/>
</xsd:restriction>
</xsd:simpleType>
• The <maxLength> and <minLength> facets specify
the maximum and minimum lengths for values in the
type definition.
• The <pattern> facet applies a specific pattern that
the type definition’s value must match.
<xsd:simpleType name=”ZipType”>
<xsd:restriction base=”xsd:string”>
<xsd:minLength value=”5”/>
<xsd:maxLength value=”10”/>
<xsd:pattern value=”[0-9]{5}(-[0-9]{4})?”/>
</xsd:restriction>
</xsd:simpleType>
• Anonymous Type Declarations
– Sometimes within an XML schema it may not be
necessary to create a separate type definition for
an element or attribute. In such cases, you may
use “anonymous” type declarations.
<xsd:complexType name=”InfoType”>
<xsd:sequence>
<xsd:element name=”Name” minOccurs=”1” maxOccurs=”1”>
<xsd:simpleType>
<xsd:restriction base=”xsd:string”/>
</xsd:simpleType>
</xsd:element>
<xsd:element name=”Address” type=”AddressType”
minOccurs=”1” maxOccurs=”1”/>
• Targeting namespace
• Inheriting from others
Class poll
1. Schema is an _____ based alternative
XHTML
XML
XSL
XSLT
Answer
1. Schema is an _____ based alternative
XHTML
XML
XSL
XSLT
2. XSD is:
XHTML Schema Definition
XSL Schema Definition
XML Schema Definition
XSLT Schema Definition
Answer
2. XSD is:
XHTML Schema Definition
XSL Schema Definition
XML Schema Definition
XSLT Schema Definition
3.XML Schemas are the Successors of
DTD
XML
XSL
XSLT
Answer
3.XML Schemas are the Successors of
DTD
XML
XSL
XSLT
4.One of the greatest strength of XML Schemas is the support
for
images
data types
graphics
functions
Answer
4.One of the greatest strength of XML Schemas is the support
for
images
data types
graphics
functions
05. The syntax for defining an attribute is:
<xs:attribute name="xxx" type="yyy"/>
<xs:attribute name="xxx" />
<attribute name="xxx" type="yyy"/>
<xs:attribute name=xxx type=yyy/>
Answer
05. The syntax for defining an attribute is:
<xs:attribute name="xxx" type="yyy"/>
<xs:attribute name="xxx" />
<attribute name="xxx" type="yyy"/>
<xs:attribute name=xxx type=yyy/>
Exercise
Create a PurchaseOrder2.xsd that Contains the
Schema Definition for PurchaseOrder.xml with
a Target Namespace and Qualified Elements
and Attributes
<xsd:complexType name=”PurchaseOrderType”>
<xsd:all>
<xsd:element name=”ShippingInformation” type=”InfoType” minOccurs=”1”
maxOccurs=”1”/>
<xsd:element name=”BillingInformation” type=”InfoType” minOccurs=”1”
maxOccurs=”1”/>
<xsd:element name=”Order” type=”OrderType” minOccurs=”1” maxOccurs=”1”/>
</xsd:all>
<xsd:attribute name=”Tax”>
<xsd:simpleType>
<xsd:restriction base=”xsd:decimal”>
<xsd:fractionDigits value=”2”/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name=”Total”>
<xsd:simpleType>
<xsd:restriction base=”xsd:decimal”>
<xsd:fractionDigits value=”2”/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>

More Related Content

What's hot

Informasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringeneInformasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringene
Stian Danenbarger
 
XStream
XStreamXStream
XStream
Angelin R
 
Xsd
XsdXsd
XML Schemas
XML SchemasXML Schemas
XML Schemas
People Strategists
 
Xml schema
Xml schemaXml schema
Xml schema
Harry Potter
 
Xml Schema
Xml SchemaXml Schema
Xml Schema
vikram singh
 
Xml part5
Xml part5Xml part5
Xml part5
NOHA AW
 
Css Selectors
Css SelectorsCss Selectors
Css Selectors
Igor Ognichenko
 
Java Script Basics
Java Script BasicsJava Script Basics
Java Script Basics
Ravi Kumar Hamsa
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
Bình Trọng Án
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
Abhishek Kesharwani
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
Baskarkncet
 
XML DTD and Schema
XML DTD and SchemaXML DTD and Schema
XML DTD and Schema
hamsa nandhini
 
XSD Incomplete Overview Draft
XSD Incomplete Overview DraftXSD Incomplete Overview Draft
XSD Incomplete Overview Draft
Pedro De Almeida
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
Sumant Tambe
 
SXML: S-expression eXtensible Markup Language
SXML: S-expression eXtensible Markup LanguageSXML: S-expression eXtensible Markup Language
SXML: S-expression eXtensible Markup Language
elliando dias
 
JSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB DatabasesJSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB Databases
Federico Razzoli
 
XML Fundamentals
XML FundamentalsXML Fundamentals
[2019] Spring JPA의 사실과 오해
[2019] Spring JPA의 사실과 오해[2019] Spring JPA의 사실과 오해
[2019] Spring JPA의 사실과 오해
NHN FORWARD
 
SCDJWS 1. xml schema
SCDJWS 1. xml schemaSCDJWS 1. xml schema
SCDJWS 1. xml schema
Francesco Ierna
 

What's hot (20)

Informasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringeneInformasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringene
 
XStream
XStreamXStream
XStream
 
Xsd
XsdXsd
Xsd
 
XML Schemas
XML SchemasXML Schemas
XML Schemas
 
Xml schema
Xml schemaXml schema
Xml schema
 
Xml Schema
Xml SchemaXml Schema
Xml Schema
 
Xml part5
Xml part5Xml part5
Xml part5
 
Css Selectors
Css SelectorsCss Selectors
Css Selectors
 
Java Script Basics
Java Script BasicsJava Script Basics
Java Script Basics
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
 
XML DTD and Schema
XML DTD and SchemaXML DTD and Schema
XML DTD and Schema
 
XSD Incomplete Overview Draft
XSD Incomplete Overview DraftXSD Incomplete Overview Draft
XSD Incomplete Overview Draft
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
 
SXML: S-expression eXtensible Markup Language
SXML: S-expression eXtensible Markup LanguageSXML: S-expression eXtensible Markup Language
SXML: S-expression eXtensible Markup Language
 
JSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB DatabasesJSON in MySQL and MariaDB Databases
JSON in MySQL and MariaDB Databases
 
XML Fundamentals
XML FundamentalsXML Fundamentals
XML Fundamentals
 
[2019] Spring JPA의 사실과 오해
[2019] Spring JPA의 사실과 오해[2019] Spring JPA의 사실과 오해
[2019] Spring JPA의 사실과 오해
 
SCDJWS 1. xml schema
SCDJWS 1. xml schemaSCDJWS 1. xml schema
SCDJWS 1. xml schema
 

Similar to Service Oriented Architecture-Unit-1-XML Schema

Xsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAXsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOA
prathap kumar
 
Xsd basics
Xsd basicsXsd basics
Xsd basics
xavier john
 
Xml part4
Xml part4Xml part4
Xml part4
NOHA AW
 
XML SCHEMAS
XML SCHEMASXML SCHEMAS
XML Schema
XML SchemaXML Schema
XML Schema
yht4ever
 
XML's validation - XML Schema
XML's validation - XML SchemaXML's validation - XML Schema
XML's validation - XML Schema
videde_group
 
3-SchemaExamples.pdf
3-SchemaExamples.pdf3-SchemaExamples.pdf
3-SchemaExamples.pdf
KGSCSEPSGCT
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Return on Intelligence
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
Return on Intelligence
 
Web Service Workshop - 3 days
Web Service Workshop - 3 daysWeb Service Workshop - 3 days
Web Service Workshop - 3 days
David Ionut
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
Pradeep Rapolu
 
Generation_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfGeneration_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdf
David Harrison
 
XML-Schema-Elements_Types_Attributes.pptx
XML-Schema-Elements_Types_Attributes.pptxXML-Schema-Elements_Types_Attributes.pptx
XML-Schema-Elements_Types_Attributes.pptx
AkshayKumar100378
 
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
Donghyeok Kang
 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2
Dudy Ali
 
Attacks against Microsoft network web clients
Attacks against Microsoft network web clients Attacks against Microsoft network web clients
Attacks against Microsoft network web clients
Positive Hack Days
 
XML Schemas
XML SchemasXML Schemas
XML Schemas
Hoang Nguyen
 
Schematron
SchematronSchematron
Schematron
Emiel Paasschens
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
Swati Parmar
 
Xml session
Xml sessionXml session
Xml session
Farag Zakaria
 

Similar to Service Oriented Architecture-Unit-1-XML Schema (20)

Xsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAXsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOA
 
Xsd basics
Xsd basicsXsd basics
Xsd basics
 
Xml part4
Xml part4Xml part4
Xml part4
 
XML SCHEMAS
XML SCHEMASXML SCHEMAS
XML SCHEMAS
 
XML Schema
XML SchemaXML Schema
XML Schema
 
XML's validation - XML Schema
XML's validation - XML SchemaXML's validation - XML Schema
XML's validation - XML Schema
 
3-SchemaExamples.pdf
3-SchemaExamples.pdf3-SchemaExamples.pdf
3-SchemaExamples.pdf
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Web Service Workshop - 3 days
Web Service Workshop - 3 daysWeb Service Workshop - 3 days
Web Service Workshop - 3 days
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Generation_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfGeneration_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdf
 
XML-Schema-Elements_Types_Attributes.pptx
XML-Schema-Elements_Types_Attributes.pptxXML-Schema-Elements_Types_Attributes.pptx
XML-Schema-Elements_Types_Attributes.pptx
 
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2
 
Attacks against Microsoft network web clients
Attacks against Microsoft network web clients Attacks against Microsoft network web clients
Attacks against Microsoft network web clients
 
XML Schemas
XML SchemasXML Schemas
XML Schemas
 
Schematron
SchematronSchematron
Schematron
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Xml session
Xml sessionXml session
Xml session
 

More from Ramco Institute of Technology, Rajapalayam, Tamilnadu, India

AD3251-Data Structures Design-Notes-Tree.pdf
AD3251-Data Structures  Design-Notes-Tree.pdfAD3251-Data Structures  Design-Notes-Tree.pdf
AD3251-Data Structures Design-Notes-Tree.pdf
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures  Design-Notes-Searching-Hashing.pdfAD3251-Data Structures  Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
ASP.NET-stored procedure-manual
ASP.NET-stored procedure-manualASP.NET-stored procedure-manual
Neural networks using tensor flow in amazon deep learning server
Neural networks using tensor flow in amazon deep learning serverNeural networks using tensor flow in amazon deep learning server
Neural networks using tensor flow in amazon deep learning server
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Mobile Computing-Unit-V-Mobile Platforms and Applications
Mobile Computing-Unit-V-Mobile Platforms and ApplicationsMobile Computing-Unit-V-Mobile Platforms and Applications
Mobile Computing-Unit-V-Mobile Platforms and Applications
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
CS8601 mobile computing Two marks Questions and Answer
CS8601 mobile computing Two marks Questions and AnswerCS8601 mobile computing Two marks Questions and Answer
CS8601 mobile computing Two marks Questions and Answer
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Mobile computing Unit III MANET Notes
Mobile computing Unit III MANET NotesMobile computing Unit III MANET Notes
Unit II -Mobile telecommunication systems
Unit II -Mobile telecommunication systemsUnit II -Mobile telecommunication systems
Unit II -Mobile telecommunication systems
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Mobile computing unit-I-notes 07.01.2020
Mobile computing unit-I-notes 07.01.2020Mobile computing unit-I-notes 07.01.2020
Mobile computing unit-I-notes 07.01.2020
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Virtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc NetworksVirtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc Networks
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Flipped class collaborative learning-kaliappan-rit
Flipped class collaborative learning-kaliappan-ritFlipped class collaborative learning-kaliappan-rit
Flipped class collaborative learning-kaliappan-rit
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Web services-Notes
Web services-NotesWeb services-Notes
Building Service Oriented Architecture based applications
Building Service Oriented Architecture based applicationsBuilding Service Oriented Architecture based applications
Building Service Oriented Architecture based applications
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Innovative Practice-ZigSaw
Innovative Practice-ZigSaw Innovative Practice-ZigSaw
SOA unit-3-notes-Introduction to Service Oriented Architecture
SOA unit-3-notes-Introduction to Service Oriented ArchitectureSOA unit-3-notes-Introduction to Service Oriented Architecture
SOA unit-3-notes-Introduction to Service Oriented Architecture
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Innovative practice -Three step interview-Dr.M.Kaliappan
Innovative practice -Three step interview-Dr.M.KaliappanInnovative practice -Three step interview-Dr.M.Kaliappan
Innovative practice -Three step interview-Dr.M.Kaliappan
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
IT6801-Service Oriented Architecture-Unit-2-notes
IT6801-Service Oriented Architecture-Unit-2-notesIT6801-Service Oriented Architecture-Unit-2-notes
IT6801-Service Oriented Architecture-Unit-2-notes
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Innovative Practice-Think-pair-share-Topic: DTD for TV schedule
Innovative Practice-Think-pair-share-Topic: DTD for TV scheduleInnovative Practice-Think-pair-share-Topic: DTD for TV schedule
Innovative Practice-Think-pair-share-Topic: DTD for TV schedule
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
IT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notesIT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notes
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 

More from Ramco Institute of Technology, Rajapalayam, Tamilnadu, India (20)

AD3251-Data Structures Design-Notes-Tree.pdf
AD3251-Data Structures  Design-Notes-Tree.pdfAD3251-Data Structures  Design-Notes-Tree.pdf
AD3251-Data Structures Design-Notes-Tree.pdf
 
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures  Design-Notes-Searching-Hashing.pdfAD3251-Data Structures  Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
 
ASP.NET-stored procedure-manual
ASP.NET-stored procedure-manualASP.NET-stored procedure-manual
ASP.NET-stored procedure-manual
 
Neural networks using tensor flow in amazon deep learning server
Neural networks using tensor flow in amazon deep learning serverNeural networks using tensor flow in amazon deep learning server
Neural networks using tensor flow in amazon deep learning server
 
Mobile Computing-Unit-V-Mobile Platforms and Applications
Mobile Computing-Unit-V-Mobile Platforms and ApplicationsMobile Computing-Unit-V-Mobile Platforms and Applications
Mobile Computing-Unit-V-Mobile Platforms and Applications
 
CS8601 mobile computing Two marks Questions and Answer
CS8601 mobile computing Two marks Questions and AnswerCS8601 mobile computing Two marks Questions and Answer
CS8601 mobile computing Two marks Questions and Answer
 
Mobile computing Unit III MANET Notes
Mobile computing Unit III MANET NotesMobile computing Unit III MANET Notes
Mobile computing Unit III MANET Notes
 
Unit II -Mobile telecommunication systems
Unit II -Mobile telecommunication systemsUnit II -Mobile telecommunication systems
Unit II -Mobile telecommunication systems
 
Mobile computing unit-I-notes 07.01.2020
Mobile computing unit-I-notes 07.01.2020Mobile computing unit-I-notes 07.01.2020
Mobile computing unit-I-notes 07.01.2020
 
Virtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc NetworksVirtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc Networks
 
Flipped class collaborative learning-kaliappan-rit
Flipped class collaborative learning-kaliappan-ritFlipped class collaborative learning-kaliappan-rit
Flipped class collaborative learning-kaliappan-rit
 
Web services-Notes
Web services-NotesWeb services-Notes
Web services-Notes
 
Building Service Oriented Architecture based applications
Building Service Oriented Architecture based applicationsBuilding Service Oriented Architecture based applications
Building Service Oriented Architecture based applications
 
Innovative Practice-ZigSaw
Innovative Practice-ZigSaw Innovative Practice-ZigSaw
Innovative Practice-ZigSaw
 
SOA unit-3-notes-Introduction to Service Oriented Architecture
SOA unit-3-notes-Introduction to Service Oriented ArchitectureSOA unit-3-notes-Introduction to Service Oriented Architecture
SOA unit-3-notes-Introduction to Service Oriented Architecture
 
Innovative practice -Three step interview-Dr.M.Kaliappan
Innovative practice -Three step interview-Dr.M.KaliappanInnovative practice -Three step interview-Dr.M.Kaliappan
Innovative practice -Three step interview-Dr.M.Kaliappan
 
IT6801-Service Oriented Architecture-Unit-2-notes
IT6801-Service Oriented Architecture-Unit-2-notesIT6801-Service Oriented Architecture-Unit-2-notes
IT6801-Service Oriented Architecture-Unit-2-notes
 
Innovative Practice-Think-pair-share-Topic: DTD for TV schedule
Innovative Practice-Think-pair-share-Topic: DTD for TV scheduleInnovative Practice-Think-pair-share-Topic: DTD for TV schedule
Innovative Practice-Think-pair-share-Topic: DTD for TV schedule
 
IT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notesIT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notes
 
Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019
 

Recently uploaded

AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
gaafergoudaay7aga
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
TaghreedAltamimi
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
riddhimaagrawal986
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 

Recently uploaded (20)

AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 

Service Oriented Architecture-Unit-1-XML Schema

  • 1. Date: 11.07.2019 Recap • DTD attributes • Attributes type • Default attribute value • DTD Entities • Internal entities • External entities • Pre-defined entities • External Entities • Parameter entities
  • 2. XML schema • An XML schema is used to define the structure of an XML document. • It is like DTD but provides more control on XML structure. • The XML Schema language is referred to as XML Schema Definition (XSD) • XML Schema Definition Language at http://www.w3c.org/XML/Schema.
  • 3. Contactlist.xsd • <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“contactlist"> <xs:complexType> <xs:sequence> <xs:element name=“fullname" type="xs:string"/> <xs:element name=“address" type="xs:string"/> <xs:element name=“phone" type="xs:string"/> <xs:element name=“email" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
  • 4. PurchaseOrder.xml Contains a Sample Purchase Order for Common Items found in a Grocery Store <PurchaseOrder Tax=”5.76” Total=”75.77”> <ShippingInformation> <Name>Dillon Larsen</Name> <Address> <Street>123 Jones Rd.</Street> <City>Houston</City> <State>TX</State> <Zip>77381</Zip> </Address> <Method>USPS</Method> <DeliveryDate>2001-08-12</DeliveryDate> </ShippingInformation> PurchaseOrder.xml
  • 5. <BillingInformation> <Name>Madi Larsen</Name> <Address> <Street>123 Jones Rd.</Street> <City>Houston</City> <State>TX</State> <Zip>77381</Zip> </Address> <PaymentMethod>Credit card</PaymentMethod> <BillingDate>2001-08-09</BillingDate> </BillingInformation>
  • 6. <Order SubTotal=”70.01” ItemsSold=”17”> <Product Name=”Baby Swiss” Id=”702890” Price=”2.89” Quantity=”1”/> <Product Name=”Hard Salami” Id=”302340” Price=”2.34” Quantity=”1”/> </Order> </PurchaseOrder>
  • 7. • Declaring Attributes – Attributes provide additional information to elements. – To indicate that a complex element has an attribute, use the <attribute> element of the XML Schema Definition Language.
  • 8. <xs:element name=“fullname" type="xs:string"/> <xsd:complexType name=”ProductType”> <xsd:attribute name=”Name” type=”xsd:string”/> <xsd:attribute name=”Id” type=”xsd:positiveInteger”/> <xsd:attribute name=”Price”> <xsd:simpleType> <xsd:restriction base=”xsd:decimal”> <xsd:fractionDigits value=”2”/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name=”Quantity” type=”xsd:positiveInteger”/> </xsd:complexType>
  • 9. primitive data type• anyURI • base64Binary • Boolean • date • dateTime • decimal • double • duration • Float • gDay • gMonth • gMonthDay • gYear • gYearMonth • hexBinary • NOTATION • Qname • string • time
  • 10. Derived data type • Byte • ENTITIES • ENTITY • ID • IDREF • IDREFS • int • integer • language • long • Name
  • 11. • Declaring Elements – Elements within an XML schema can be declared using the <element> element from the XML Schema Definition Language. • Syntax <element name=”” [type=””] [abstract=””] [block=””] [default=””] [final=””] [fixed=””] [minOccurs=””] [maxOccurs=””] [nillable=””] [ref=””] [substitutionGroup=””]/ – The abstract attribute indicates whether the element being declared may show up directly within the XML document – this element must be referenced by another element using the substitutionGroup attribute.
  • 12. <xsd:element name=’PurchaseOrder’ type=’PurchaseOrderType’/> <xsd:complexType name=”PurchaseOrderType”> <xsd:all> <xsd:element name=”ShippingInformation” type=”InfoType” minOccurs=”1” maxOccurs=”1”/> <xsd:element name=”BillingInformation” type=”InfoType” minOccurs=”1” maxOccurs=”1”/> <xsd:element name=”Order” type=”OrderType” minOccurs=”1” maxOccurs=”1”/> </xsd:all> the child elements can appear in any order
  • 13. • Declaring Complex Elements – <complexType> element is used to define an element that contain child elements and/or attributes. <xsd:complexType name=’’ [abstract=’’] [base=’’] [block=’’] [final=’’] [mixed=’’]/> • The abstract attribute indicates whether an element may define its content directly from this type definition – If this attribute is true, an element must define its content from a derived type definition. – If this attribute is omitted or its value is false, an element may define its content directly based on this type definition. • The base attribute specifies the data type for the element. • The block attribute indicates what types of derivation are prevented for this element definition. This attribute can contain any of the following values: – all – extension – restriction
  • 14. Ex:Complex Elements <xsd:element name=’PurchaseOrder’ type=’PurchaseOrderType’/> <xsd:complexType name=”PurchaseOrderType”> <xsd:all> <xsd:element name=”ShippingInformation” type=”InfoType” minOccurs=”1” maxOccurs=”1”/> <xsd:element name=”BillingInformation” type=”InfoType” minOccurs=”1” maxOccurs=”1”/> <xsd:element name=”Order” type=”OrderType” minOccurs=”1” maxOccurs=”1”/> </xsd:all>
  • 15. • Declaring Simple Types – It is used to define single element in an XML scheme – Syntax <xsd:simpleType name=’’> <xsd:restriction base=’’/> </xsd:simpleType>
  • 16. <xsd:attribute name=”Price”> <xsd:simpleType> <xsd:restriction base=”xsd:decimal”> <xsd:fractionDigits value=”2”/> </xsd:restriction> </xsd:simpleType> </xsd:attribute>
  • 17. • Refining Simple Types Using Facets – Facets give greater control over the definition of elements and attributes. – A facet can only be specified for a <simpleType> element, and it helps determine the set of values for a <simpleType> element. • enumeration • fractionDigits • length • maxExclusive • maxInclusive • maxLength • minExclusive • minInclusive • minLength • pattern
  • 18. <xsd:simpleType name=”PaymentMethodType”> <xsd:restriction base=”xsd:string”> <xsd:enumeration value=”Check”/> <xsd:enumeration value=”Cash”/> <xsd:enumeration value=”Credit Card”/> <xsd:enumeration value=”Debit Card”/> <xsd:enumeration value=”Other”/> </xsd:restriction> </xsd:simpleType> < xsd:enumeration > facet
  • 19. The <fractionDigits> facet specifies the maximum number of decimal digits in the fractional part. <xsd:attribute name=”SubTotal”> <xsd:simpleType> <xsd:restriction base=”xsd:decimal”> <xsd:fractionDigits value=”2”/> </xsd:restriction> </xsd:simpleType> </xsd:attribute>
  • 20. The <length> facet determines the number of units of length for the specified data type <xsd:simpleType name=”StateType”> <xsd:restriction base=”xsd:string”> <xsd:length value=”2”/> <xsd:enumeration value=”AR”/> <xsd:enumeration value=”LA”/> <xsd:enumeration value=”MS”/> <xsd:enumeration value=”OK”/> <xsd:enumeration value=”TX”/> </xsd:restriction> </xsd:simpleType>
  • 21. • The <maxLength> and <minLength> facets specify the maximum and minimum lengths for values in the type definition. • The <pattern> facet applies a specific pattern that the type definition’s value must match. <xsd:simpleType name=”ZipType”> <xsd:restriction base=”xsd:string”> <xsd:minLength value=”5”/> <xsd:maxLength value=”10”/> <xsd:pattern value=”[0-9]{5}(-[0-9]{4})?”/> </xsd:restriction> </xsd:simpleType>
  • 22. • Anonymous Type Declarations – Sometimes within an XML schema it may not be necessary to create a separate type definition for an element or attribute. In such cases, you may use “anonymous” type declarations. <xsd:complexType name=”InfoType”> <xsd:sequence> <xsd:element name=”Name” minOccurs=”1” maxOccurs=”1”> <xsd:simpleType> <xsd:restriction base=”xsd:string”/> </xsd:simpleType> </xsd:element> <xsd:element name=”Address” type=”AddressType” minOccurs=”1” maxOccurs=”1”/>
  • 23. • Targeting namespace • Inheriting from others
  • 24. Class poll 1. Schema is an _____ based alternative XHTML XML XSL XSLT
  • 25. Answer 1. Schema is an _____ based alternative XHTML XML XSL XSLT
  • 26. 2. XSD is: XHTML Schema Definition XSL Schema Definition XML Schema Definition XSLT Schema Definition
  • 27. Answer 2. XSD is: XHTML Schema Definition XSL Schema Definition XML Schema Definition XSLT Schema Definition
  • 28. 3.XML Schemas are the Successors of DTD XML XSL XSLT
  • 29. Answer 3.XML Schemas are the Successors of DTD XML XSL XSLT
  • 30. 4.One of the greatest strength of XML Schemas is the support for images data types graphics functions
  • 31. Answer 4.One of the greatest strength of XML Schemas is the support for images data types graphics functions
  • 32. 05. The syntax for defining an attribute is: <xs:attribute name="xxx" type="yyy"/> <xs:attribute name="xxx" /> <attribute name="xxx" type="yyy"/> <xs:attribute name=xxx type=yyy/>
  • 33. Answer 05. The syntax for defining an attribute is: <xs:attribute name="xxx" type="yyy"/> <xs:attribute name="xxx" /> <attribute name="xxx" type="yyy"/> <xs:attribute name=xxx type=yyy/>
  • 34. Exercise Create a PurchaseOrder2.xsd that Contains the Schema Definition for PurchaseOrder.xml with a Target Namespace and Qualified Elements and Attributes
  • 35. <xsd:complexType name=”PurchaseOrderType”> <xsd:all> <xsd:element name=”ShippingInformation” type=”InfoType” minOccurs=”1” maxOccurs=”1”/> <xsd:element name=”BillingInformation” type=”InfoType” minOccurs=”1” maxOccurs=”1”/> <xsd:element name=”Order” type=”OrderType” minOccurs=”1” maxOccurs=”1”/> </xsd:all> <xsd:attribute name=”Tax”> <xsd:simpleType> <xsd:restriction base=”xsd:decimal”> <xsd:fractionDigits value=”2”/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name=”Total”> <xsd:simpleType> <xsd:restriction base=”xsd:decimal”> <xsd:fractionDigits value=”2”/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType>