Your SlideShare is downloading. ×
SCDJWS 1. xml schema
SCDJWS 1. xml schema
SCDJWS 1. xml schema
SCDJWS 1. xml schema
SCDJWS 1. xml schema
SCDJWS 1. xml schema
SCDJWS 1. xml schema
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

SCDJWS 1. xml schema

502

Published on

It's cover the first chapter about the SCDJWS certification. …

It's cover the first chapter about the SCDJWS certification.

Refers to:
1. SCDJWS 5.0 Study Guide by Mikalai Zaikin
2. SCDJWS 5 Study Notes by Ivan A Krizsan

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
502
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
49
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1.
      XML Schema
      Francesco Ierna
  • 2.
      XML Document
  • 3.
      XML Schema
    • XML SCHEMA :
      • A way of describing and constraining the content of XML documents.
    • Three parts :
      • Datatypes
      • 4. Contranints the XML Documents
      • 5. What schema are and how one builds a schema
    • Four main elements :
      • Xsd:element  : contains simple or complext type if no type is specified
      • 6. Xsd:attribute ( always simple type, no order req)
      • 7. Xsd:complextType  : descrive how elements that contains other elements are organized. Can extends and restrict
        • Sequence  : optional element
        • 8. All  : any order, maxOccurs 1 and MinOccurs 0, in all group
        • 9. Choise  : one of elements contained in the choise element to be present in the containing element
      • Xsd:simpleType ( derives from existing type, restricting) : cannont t contains child elements or attributes
        • Derives frome existing type
        • 10. Rescrting existing type (xsd:rescriting)
          • length , minLength , maxLength , pattern , enumeration , whiteSpace , maxInclusive , maxExclusive , minInclusive , minExclusive , totalDigits , fractionDigits
  • 11.
      Example .XSD
    <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?> <xsd:schema (root) xmlns:xsd=' http://www.w3.org/2001/XMLSchema ' (default) xmlns:xsd=&quot;http://www.ivan.com/schemas&quot; > <xsd:element name=&quot; order_request &quot;> <xsd:complexType> <xsd:sequence> ---------------> <xsd:element name=&quot; company_name &quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot; product_id &quot; Type=&quot;xsd:string&quot;/> <xsd:element name=&quot; product_price &quot; type=&quot;xsd:double&quot;/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> < order_request > < company_name >IBA JV</company_name> < product_id >C-0YST</product_id> < product_price >500.00</product_price> </ order_request >
  • 12.
      Example XML
  • 13.
      Include – Redefine- Import
    1. &quot;include&quot; Component - This component brings all declarations and definitions of an external schema document into the current schema . The external schema document must have the same target namespace as the current schema. &quot;include&quot; components are usually used to build a new schema by extending existing schema documents. 2. &quot;redefine&quot; Component - This component offers the same functions as the &quot;include&quot; component. But a &quot;redefine&quot; component also allows you redefine some datatypes provided in the included schema document . &quot;redefine&quot; components are usually used to revise a schema by redefining datatype definitions of existing schema documents. 3. &quot;import&quot; Component - This component offers the same functions as the &quot;include&quot; component except that the included schema document has a different target namespace. &quot;import&quot; components are usually used to build a new schema by borrowing element declarations from existing schema documents from other namespaces.
  • 14.
      Import

×