SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
‫أكاديمية الحكومة اإللكترونية الفلسطينية‬
             The Palestinian eGovernment Academy
                          www.egovacademy.ps




Tutorial II: Data Integration and Open Information Systems
                         Session3
                XML Schemas

                      Dr. Ismail M. Romi
                   Palestine Polytechnic University




                             PalGov © 2011               1
About

This tutorial is part of the PalGov project, funded by the TEMPUS IV program of the
Commission of the European Communities, grant agreement 511159-TEMPUS-1-
2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.ps
Project Consortium:

             Birzeit University, Palestine
                                                           University of Trento, Italy
             (Coordinator )


             Palestine Polytechnic University, Palestine   Vrije Universiteit Brussel, Belgium


             Palestine Technical University, Palestine
                                                           Université de Savoie, France

             Ministry of Telecom and IT, Palestine
                                                           University of Namur, Belgium
             Ministry of Interior, Palestine
                                                           TrueTrust, UK
             Ministry of Local Government, Palestine


Coordinator:
Dr. Mustafa Jarrar
Birzeit University, P.O.Box 14- Birzeit, Palestine
Telfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011
                                                                                                 2
© Copyright Notes
Everyone is encouraged to use this material, or part of it, but should
properly cite the project (logo and website), and the author of that part.


No part of this tutorial may be reproduced or modified in any form or by
any means, without prior written permission from the project, who have
the full copyrights on the material.




                 Attribution-NonCommercial-ShareAlike
                              CC-BY-NC-SA

This license lets others remix, tweak, and build upon your work non-
commercially, as long as they credit you and license their new creations
under the identical terms.

                                 PalGov © 2011                               3
Tutorial Map

                                                                                                           Topic                                     h
              Intended Learning Objectives
                                                                              Session 1: XML Basics and Namespaces                               3
A: Knowledge and Understanding
                                                                              Session 2: XML DTD’s                                               3
  2a1: Describe tree and graph data models.
                                                                              Session 3: XML Schemas                                             3
  2a2: Understand the notation of XML, RDF, RDFS, and OWL.
                                                                              Session 4: Lab-XML Schemas                                         3
  2a3: Demonstrate knowledge about querying techniques for data
  models as SPARQL and XPath.                                                 Session 5: RDF and RDFs                                            3

  2a4: Explain the concepts of identity management and Linked data.           Session 6: Lab-RDF and RDFs                                        3
  2a5: Demonstrate knowledge about Integration &fusion of                     Session 7: OWL (Ontology Web Language)                             3
  heterogeneous data.                                                         Session 8: Lab-OWL                                                 3
B: Intellectual Skills                                                        Session 9: Lab-RDF Stores -Challenges and Solutions                3
  2b1: Represent data using tree and graph data models (XML &                 Session 10: Lab-SPARQL                                             3
  RDF).                                                                       Session 11: Lab-Oracle Semantic Technology                         3
  2b2: Describe data semantics using RDFS and OWL.                            Session 12_1: The problem of Data Integration                      1.5
  2b3: Manage and query data represented in RDF, XML, OWL.                    Session 12_2: Architectural Solutions for the Integration Issues   1.5
  2b4: Integrate and fuse heterogeneous data.                                 Session 13_1: Data Schema Integration                              1
C: Professional and Practical Skills                                          Session 13_2: GAV and LAV Integration                              1
  2c1: Using Oracle Semantic Technology and/or Virtuoso to store              Session 13_3: Data Integration and Fusion using RDF                1
  and query RDF stores.                                                       Session 14: Lab-Data Integration and Fusion using RDF              3
D: General and Transferable Skills
  2d1: Working with team.                                                     Session 15_1: Data Web and Linked Data                             1.5
  2d2: Presenting and defending ideas.                                        Session 15_2: RDFa                                                 1.5
  2d3: Use of creativity and innovation in problem solving.
  2d4: Develop communication skills and logical reasoning abilities.          Session 16: Lab-RDFa                                               3

                                                                       PalGov © 2011                                                                     4
Session ILO’s:

After completing this session students will be able to:
   •Manage data represented in XML.

   •Represent data using tree and graph data models.

   •Build Well-Formed XML Document.




                            PalGov © 2011                 5
Session4: XML Schemas

Session Overview:
<Benefits of XML Schemas />
<How to create and use XML Schemas/>
<How to document your XML Schemas/>




                PalGov © 2011          6
XML Schema

• The term XML Schema is used to refer to the specific
  W3C XML Schema technology.
• W3C XML Schemas, much like DTDs, enable you to
  describe the structure of an XML document.
• XML Schema definitions are also commonly referred
  to as XSDs.




                        PalGov © 2011                    7
Benefits of XML Schemas

 XML Schemas are created using basic XML, while DTDs
  utilize a separate syntax.
 XML Schemas fully support the Namespace
  Recommendation.
 XML Schemas enable you to validate text element content
  based on built-in and user-defined data types.
 XML Schemas enable you to more easily create complex
  and reusable content models.
 XML Schemas enable the modeling of programming
  concepts such as object inheritance and type substitution.


                           PalGov © 2011                       8
Do We Still Need DTDs?

• XML Schemas provide better features for describing
  documents—as well as a more common syntax—they
  provide no ENTITY functionality.
• In many XML documents and applications, the ENTITY
  declaration is important.
• DTD can be embedded in the xml document.
• DTD supported by the SGML.




                         PalGov © 2011                 9
XML Schemas

XML Schema divided into three parts:
 An introduction to XML Schema concepts at:
   www.w3.org/TR/xmlschema-0/

 A document that defines all of the structures used in XML
  Schemas at: ww.w3.org/TR/xmlschema-1/
 A document that describes XML Schema data types at
  www.w3.org/TR/xmlschema-2/




                           PalGov © 2011                      10
The XML Schema Document

• Most XML Schemas are stored within a separate XML
  document.
• XML Schemas function very similarly to external DTDs
• XML document contains a reference to the XML Schema
  that defines its vocabulary.
• An XML document that adheres to a particular XML
  Schema vocabulary is called an XML Schema instance
  document.




                         PalGov © 2011                   11
XSD Example

<?xml version=‖1.0‖?>
<schema xmlns=‖http://www.w3.org/2001/XMLSchema‖
xmlns:target=‖http://www.example.com/name‖
targetNamespace=‖http://www.example.com/name‖
elementFormDefault=‖qualified‖>
    <element name=‖name‖>
      <complexType>
         <sequence>
              <element name=‖first‖ type=‖string‖/>
              <element name=‖middle‖ type=‖string‖/>
              <element name=‖last‖ type=‖string‖/>
         </sequence>
          <attribute name=‖title‖ type=‖string‖/>
        </complexType>
    </element>
</schema>
                               PalGov © 2011           12
The <schema> Element

The <schema> element is the root element of every XML
  Schema:

<?xml version="1.0"?>

<xs:schema>
...
...
</xs:schema>


                       PalGov © 2011                    13
The <schema> Element….Cont


 The <schema> element may contain some attributes.
 A schema declaration often looks something like this:
<?xml version="1.0"?>
<xs:schema
  xmlns:xs=             “http://www.w3.org/2001/XMLSchema”
  targetNamespace=      “http://www.w3schools.com”
  xmlns=                “http://www.w3schools.com”
  elementFormDefault=   "qualified">
 ...
 ...
 </xs:schema>




                            PalGov © 2011                    14
The XML schema Namespace

• You can use any of the following <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”>




                    PalGov © 2011                 15
• Indicates that the elements and data types
  used in the schema come from the
  ―http://www.w3.org/2001/XMLSchema" namespace.
• It also specifies that the elements and data
  types that come from the
  ―http://www.w3.org/2001/XMLSchema" namespace
  should be prefixed with xs: or xsd:



                    PalGov © 2011             16
Target Namespaces

• The primary purpose of XML Schemas is to declare
  vocabularies.
• These vocabularies can be identified by a namespace that
  is specified in the target namespace attribute.
• When declaring a target namespace, it is important to
  include a matching namespace declaration.

   <xs:schema xmlns:xs=‖http://www.w3.org/2001/XMLSchema‖
   targetNamespace=‖http://www.example.com/name‖
   xmlns=‖http://www.example.com/name‖>

  Indicates the                           Indicates that the
                                          elements defined by this
  default namespace.
                                          schema come from this
                                          target namespace.
                          PalGov © 2011                              17
Element and Attribute Qualification

<schema xmlns=‖http://www.w3.org/2001/XMLSchema‖
 xmlns:target=‖http://www.example.com/name‖
  targetNamespace=‖http://www.example.com/name‖
  elementFormDefault=‖qualified‖>

elementFromDefault = ―qualified‖ or ―unqualified‖
attributeFromDefault ― qualified‖ or ―unqualified‖

• qualified: if it has an associated namespace.
• unqualified: if it hasn’t associated namespaces



                             PalGov © 2011           18
Simple <element> Declarations

<xs:element name="xxx"
 type="yyy"/>
 xxx: the name of the element
        • The name must follow the rules for XML names.
 yyy: the data type of the element.

 XML Schema has a lot of built-in data types.
 The most common types are:
   –   xs:string
   –   xs:decimal
   –   xs:integer
   –   xs:boolean
   –   xs:date
   –   xs:time

                             PalGov © 2011                19
Example

• Here are some simple XML elements:
  <lastname>Jones</lastname>
  <age>36</age>
  <dateborn>1970-03-27</dateborn>


• Here are the corresponding simple element
  definitions:
  <xs:element name="lastname" type="xs:string"/>
  <xs:element name="age"      type="xs:integer"/>
  <xs:element name="dateborn" type="xs:date"/>



                          PalGov © 2011             20
Cardinality

• Cardinality represents the number of
  occurrences of a specific element within a
  content model.

<element name=‖first‖ type=‖string‖ minOccurs=‖x‖ maxOccurs=‖y‖/>

• x : minimum number of occurrence, default =1
• y : maximum number of occurrence, unbound: open occurrence




                               PalGov © 2011                        21
Default and Fixed Values

 Simple elements may have a default value OR a fixed
  value specified.
 Default value is automatically assigned to the element
  when no other value is specified.
 In the following example the default value is "red":

<xs:element name="color" type="xs:string" default="red"/>


 Fixed value is also automatically assigned to the element,
  and you cannot specify another value. In the following
  example the fixed value is "red":

<xs:element name="color" type="xs:string" fixed="red"/>




                           PalGov © 2011                       22
<complexType> Declarations

A complex element is an XML element that
 contains other elements and/or attributes.
There are four kinds of complex elements:
  empty elements
  elements that contain only other elements
  elements that contain only text
  elements that contain both other elements and
   text
Note: Each of these elements may contain
 attributes as well!

                     PalGov © 2011                 23
empty elements

• A complex XML element, "product", which is
  empty:

  <product pid="1345"/>




                          PalGov © 2011    24
elements that contain only other elements

• A complex XML element, "employee", which
  contains only other elements:

 <employee>
     <firstname>John</firstname>
     <lastname>Smith</lastname>
  </employee>




                       PalGov © 2011            25
elements that contain only text

• A complex XML element, "food", which
  contains only text:

  <food type="dessert“ Ice cream</food>




                          PalGov © 2011   26
elements that contain both other elements and text


• A complex XML element, "description",
  which contains both elements and text:

<description> It happened on
   <date lang="norwegian">03.03.99</date> ....
</description>




                        PalGov © 2011                     27
How to Define a Complex Element

• Look at this complex XML element,
  "employee", which contains only other
  elements:

 <employee>
     <firstname>John</firstname>
     <lastname>Smith</lastname>
  </employee>




                         PalGov © 2011    28
The "employee" element can be declared directly by naming the element,
   like this:

    <xs:element name="employee">
      <xs:complexType>
        <xs:sequence>
        <xs:element name="firstname" type="xs:string"/>
        <xs:element name="lastname“ type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>

•   If you use the method described above, only the "employee" element
    can use the specified complex type.
•   Note that the child elements, "firstname" and "lastname", are
    surrounded by the <sequence> indicator. This means that the child
    elements must appear in the same order as they are declared.


                               PalGov © 2011                         29
<attribute> Declarations

• The syntax for defining an attribute is:

<xs:attribute name="xxx" type="yyy"/>

   – Where xxx is the name of the attribute and yyy specifies
     the data type of the attribute.

   – Simple elements can’t have attributes




                           PalGov © 2011                        30
Summary

• XML Schema is used to refer to the specific W3C
  XML Schema technology.
• W3C XML Schemas, much like DTDs, enable you
  to describe the structure of an XML document.




                    PalGov © 2011              31
Refrences

• Hunter, H, Rafter, J., Fawcett, J., Vlist, E., Ayers, D., Duckett, J., Watt,
  A., McKinnon,L., (2007), "Beginning XML", 4th Ed.,Wiley Publishing
   Inc: Indiana, USA.
• Ray, E., (2003), "Learning XML", 2nd Ed., O’Rreilly Media Inc.: USA.
• Amiano, M., D'Cruz, C., Ethier, K., Thomas, M., (2006), XML:
  Problem - Design – Solution", Wiley Publishing Inc: Indiana, USA.
• http://www.w3.org
• http://www.w3schools.com
• http://www.xml.com
• http://www.xml.org




                                    PalGov © 2011                                32
<e-Gov> Thank you </e-Gov>




           PalGov © 2011   33

Mais conteúdo relacionado

Mais procurados

Pal gov.tutorial2.session16.lab rd-fa
Pal gov.tutorial2.session16.lab rd-faPal gov.tutorial2.session16.lab rd-fa
Pal gov.tutorial2.session16.lab rd-faMustafa Jarrar
 
Pal gov.tutorial2.session10.sparql
Pal gov.tutorial2.session10.sparqlPal gov.tutorial2.session10.sparql
Pal gov.tutorial2.session10.sparqlMustafa Jarrar
 
Pal gov.tutorial2.session8.lab owl
Pal gov.tutorial2.session8.lab owlPal gov.tutorial2.session8.lab owl
Pal gov.tutorial2.session8.lab owlMustafa Jarrar
 
Pal gov.tutorial2.session14.lab rdf-dataintegration
Pal gov.tutorial2.session14.lab rdf-dataintegrationPal gov.tutorial2.session14.lab rdf-dataintegration
Pal gov.tutorial2.session14.lab rdf-dataintegrationMustafa Jarrar
 
Pal gov.tutorial2.session5 2.rdfs_jarrar
Pal gov.tutorial2.session5 2.rdfs_jarrarPal gov.tutorial2.session5 2.rdfs_jarrar
Pal gov.tutorial2.session5 2.rdfs_jarrarMustafa Jarrar
 
Pal gov.tutorial2.session4.lab xml document and schemas
Pal gov.tutorial2.session4.lab xml  document and schemasPal gov.tutorial2.session4.lab xml  document and schemas
Pal gov.tutorial2.session4.lab xml document and schemasMustafa Jarrar
 
Pal gov.tutorial2.session13 2.gav and lav integration
Pal gov.tutorial2.session13 2.gav and lav integrationPal gov.tutorial2.session13 2.gav and lav integration
Pal gov.tutorial2.session13 2.gav and lav integrationMustafa Jarrar
 
Pal gov.tutorial2.session13 3.data integration and fusion using rdf
Pal gov.tutorial2.session13 3.data integration and fusion using rdfPal gov.tutorial2.session13 3.data integration and fusion using rdf
Pal gov.tutorial2.session13 3.data integration and fusion using rdfMustafa Jarrar
 
Pal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddataPal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddataMustafa Jarrar
 
Pal gov.tutorial2.session12 1.the problem of data integration
Pal gov.tutorial2.session12 1.the problem of data integrationPal gov.tutorial2.session12 1.the problem of data integration
Pal gov.tutorial2.session12 1.the problem of data integrationMustafa Jarrar
 
Pal gov.tutorial2.session12 2.architectural solutions for the integration issues
Pal gov.tutorial2.session12 2.architectural solutions for the integration issuesPal gov.tutorial2.session12 2.architectural solutions for the integration issues
Pal gov.tutorial2.session12 2.architectural solutions for the integration issuesMustafa Jarrar
 
Pal gov.tutorial2.session13 1.data schema integration
Pal gov.tutorial2.session13 1.data schema integrationPal gov.tutorial2.session13 1.data schema integration
Pal gov.tutorial2.session13 1.data schema integrationMustafa Jarrar
 
Pal gov.tutorial2.session0.outline
Pal gov.tutorial2.session0.outlinePal gov.tutorial2.session0.outline
Pal gov.tutorial2.session0.outlineMustafa Jarrar
 
Pal gov.tutorial3.session3.xpath & xquery (lab1)
Pal gov.tutorial3.session3.xpath & xquery (lab1)Pal gov.tutorial3.session3.xpath & xquery (lab1)
Pal gov.tutorial3.session3.xpath & xquery (lab1)Mustafa Jarrar
 
Pal gov.tutorial3.session2.xml ns and schema
Pal gov.tutorial3.session2.xml ns and schemaPal gov.tutorial3.session2.xml ns and schema
Pal gov.tutorial3.session2.xml ns and schemaMustafa Jarrar
 
Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...
Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...
Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...François Belleau
 
Pal gov.tutorial3.session6.soap
Pal gov.tutorial3.session6.soapPal gov.tutorial3.session6.soap
Pal gov.tutorial3.session6.soapMustafa Jarrar
 
Linked List Problems
Linked List ProblemsLinked List Problems
Linked List ProblemsSriram Raj
 
LODUM talk at ifgi's Spatial @ WWU series
LODUM talk at ifgi's Spatial @ WWU seriesLODUM talk at ifgi's Spatial @ WWU series
LODUM talk at ifgi's Spatial @ WWU seriesCarsten Keßler
 

Mais procurados (20)

Pal gov.tutorial2.session16.lab rd-fa
Pal gov.tutorial2.session16.lab rd-faPal gov.tutorial2.session16.lab rd-fa
Pal gov.tutorial2.session16.lab rd-fa
 
Pal gov.tutorial2.session10.sparql
Pal gov.tutorial2.session10.sparqlPal gov.tutorial2.session10.sparql
Pal gov.tutorial2.session10.sparql
 
Pal gov.tutorial2.session8.lab owl
Pal gov.tutorial2.session8.lab owlPal gov.tutorial2.session8.lab owl
Pal gov.tutorial2.session8.lab owl
 
Pal gov.tutorial2.session14.lab rdf-dataintegration
Pal gov.tutorial2.session14.lab rdf-dataintegrationPal gov.tutorial2.session14.lab rdf-dataintegration
Pal gov.tutorial2.session14.lab rdf-dataintegration
 
Pal gov.tutorial2.session5 2.rdfs_jarrar
Pal gov.tutorial2.session5 2.rdfs_jarrarPal gov.tutorial2.session5 2.rdfs_jarrar
Pal gov.tutorial2.session5 2.rdfs_jarrar
 
Pal gov.tutorial2.session4.lab xml document and schemas
Pal gov.tutorial2.session4.lab xml  document and schemasPal gov.tutorial2.session4.lab xml  document and schemas
Pal gov.tutorial2.session4.lab xml document and schemas
 
Pal gov.tutorial2.session13 2.gav and lav integration
Pal gov.tutorial2.session13 2.gav and lav integrationPal gov.tutorial2.session13 2.gav and lav integration
Pal gov.tutorial2.session13 2.gav and lav integration
 
Pal gov.tutorial2.session13 3.data integration and fusion using rdf
Pal gov.tutorial2.session13 3.data integration and fusion using rdfPal gov.tutorial2.session13 3.data integration and fusion using rdf
Pal gov.tutorial2.session13 3.data integration and fusion using rdf
 
Pal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddataPal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddata
 
Pal gov.tutorial2.session12 1.the problem of data integration
Pal gov.tutorial2.session12 1.the problem of data integrationPal gov.tutorial2.session12 1.the problem of data integration
Pal gov.tutorial2.session12 1.the problem of data integration
 
Pal gov.tutorial2.session12 2.architectural solutions for the integration issues
Pal gov.tutorial2.session12 2.architectural solutions for the integration issuesPal gov.tutorial2.session12 2.architectural solutions for the integration issues
Pal gov.tutorial2.session12 2.architectural solutions for the integration issues
 
Pal gov.tutorial2.session13 1.data schema integration
Pal gov.tutorial2.session13 1.data schema integrationPal gov.tutorial2.session13 1.data schema integration
Pal gov.tutorial2.session13 1.data schema integration
 
Pal gov.tutorial2.session0.outline
Pal gov.tutorial2.session0.outlinePal gov.tutorial2.session0.outline
Pal gov.tutorial2.session0.outline
 
Pal gov.tutorial3.session3.xpath & xquery (lab1)
Pal gov.tutorial3.session3.xpath & xquery (lab1)Pal gov.tutorial3.session3.xpath & xquery (lab1)
Pal gov.tutorial3.session3.xpath & xquery (lab1)
 
Pal gov.tutorial3.session2.xml ns and schema
Pal gov.tutorial3.session2.xml ns and schemaPal gov.tutorial3.session2.xml ns and schema
Pal gov.tutorial3.session2.xml ns and schema
 
Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...
Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...
Producing, Publishing and Consuming Linked Data Three lessons from the Bio2RD...
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
 
Pal gov.tutorial3.session6.soap
Pal gov.tutorial3.session6.soapPal gov.tutorial3.session6.soap
Pal gov.tutorial3.session6.soap
 
Linked List Problems
Linked List ProblemsLinked List Problems
Linked List Problems
 
LODUM talk at ifgi's Spatial @ WWU series
LODUM talk at ifgi's Spatial @ WWU seriesLODUM talk at ifgi's Spatial @ WWU series
LODUM talk at ifgi's Spatial @ WWU series
 

Semelhante a Pal gov.tutorial2.session3.xml schemas

Pal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemanticsPal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemanticsMustafa Jarrar
 
Pal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemanticsPal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemanticsMustafa Jarrar
 
Pal gov.tutorial3.session0.outline
Pal gov.tutorial3.session0.outlinePal gov.tutorial3.session0.outline
Pal gov.tutorial3.session0.outlineMustafa Jarrar
 
Pal gov.tutorial3.session14.lab6
Pal gov.tutorial3.session14.lab6Pal gov.tutorial3.session14.lab6
Pal gov.tutorial3.session14.lab6Mustafa Jarrar
 
Pal gov.tutorial3.session12.lab5
Pal gov.tutorial3.session12.lab5Pal gov.tutorial3.session12.lab5
Pal gov.tutorial3.session12.lab5Mustafa Jarrar
 
Pal gov.tutorial3.session5.lab2
Pal gov.tutorial3.session5.lab2Pal gov.tutorial3.session5.lab2
Pal gov.tutorial3.session5.lab2Mustafa Jarrar
 
Pal gov.tutorial3.session7
Pal gov.tutorial3.session7Pal gov.tutorial3.session7
Pal gov.tutorial3.session7Mustafa Jarrar
 
Pal gov.tutorial3.session4.rest
Pal gov.tutorial3.session4.restPal gov.tutorial3.session4.rest
Pal gov.tutorial3.session4.restMustafa Jarrar
 
Understanding Dom
Understanding DomUnderstanding Dom
Understanding DomLiquidHub
 
Introductionto Xm Lmessaging
Introductionto Xm LmessagingIntroductionto Xm Lmessaging
Introductionto Xm LmessagingLiquidHub
 
Pal gov.tutorial3.session10.lab4
Pal gov.tutorial3.session10.lab4Pal gov.tutorial3.session10.lab4
Pal gov.tutorial3.session10.lab4Mustafa Jarrar
 
epicenter2010 Open Xml
epicenter2010   Open Xmlepicenter2010   Open Xml
epicenter2010 Open XmlCraig Murphy
 
Pal gov.tutorial3.session8.lab3
Pal gov.tutorial3.session8.lab3Pal gov.tutorial3.session8.lab3
Pal gov.tutorial3.session8.lab3Mustafa Jarrar
 
Pal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnetsPal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnetsMustafa Jarrar
 

Semelhante a Pal gov.tutorial2.session3.xml schemas (15)

Pal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemanticsPal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemantics
 
Pal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemanticsPal gov.tutorial4.session1 1.needforsharedsemantics
Pal gov.tutorial4.session1 1.needforsharedsemantics
 
Pal gov.tutorial3.session0.outline
Pal gov.tutorial3.session0.outlinePal gov.tutorial3.session0.outline
Pal gov.tutorial3.session0.outline
 
Pal gov.tutorial3.session14.lab6
Pal gov.tutorial3.session14.lab6Pal gov.tutorial3.session14.lab6
Pal gov.tutorial3.session14.lab6
 
Pal gov.tutorial3.session12.lab5
Pal gov.tutorial3.session12.lab5Pal gov.tutorial3.session12.lab5
Pal gov.tutorial3.session12.lab5
 
Pal gov.tutorial3.session5.lab2
Pal gov.tutorial3.session5.lab2Pal gov.tutorial3.session5.lab2
Pal gov.tutorial3.session5.lab2
 
Pal gov.tutorial3.session7
Pal gov.tutorial3.session7Pal gov.tutorial3.session7
Pal gov.tutorial3.session7
 
Pal gov.tutorial3.session4.rest
Pal gov.tutorial3.session4.restPal gov.tutorial3.session4.rest
Pal gov.tutorial3.session4.rest
 
Understanding Dom
Understanding DomUnderstanding Dom
Understanding Dom
 
Introductionto Xm Lmessaging
Introductionto Xm LmessagingIntroductionto Xm Lmessaging
Introductionto Xm Lmessaging
 
Pal gov.tutorial3.session10.lab4
Pal gov.tutorial3.session10.lab4Pal gov.tutorial3.session10.lab4
Pal gov.tutorial3.session10.lab4
 
Poster
PosterPoster
Poster
 
epicenter2010 Open Xml
epicenter2010   Open Xmlepicenter2010   Open Xml
epicenter2010 Open Xml
 
Pal gov.tutorial3.session8.lab3
Pal gov.tutorial3.session8.lab3Pal gov.tutorial3.session8.lab3
Pal gov.tutorial3.session8.lab3
 
Pal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnetsPal gov.tutorial4.session12 2.wordnets
Pal gov.tutorial4.session12 2.wordnets
 

Mais de Mustafa Jarrar

Clustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment AnalysisClustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment AnalysisMustafa Jarrar
 
Classifying Processes and Basic Formal Ontology
Classifying Processes  and Basic Formal OntologyClassifying Processes  and Basic Formal Ontology
Classifying Processes and Basic Formal OntologyMustafa Jarrar
 
Discrete Mathematics Course Outline
Discrete Mathematics Course OutlineDiscrete Mathematics Course Outline
Discrete Mathematics Course OutlineMustafa Jarrar
 
Business Process Implementation
Business Process ImplementationBusiness Process Implementation
Business Process ImplementationMustafa Jarrar
 
Business Process Design and Re-engineering
Business Process Design and Re-engineeringBusiness Process Design and Re-engineering
Business Process Design and Re-engineeringMustafa Jarrar
 
BPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical ConstructsBPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical ConstructsMustafa Jarrar
 
BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs  BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs Mustafa Jarrar
 
Introduction to Business Process Management
Introduction to Business Process ManagementIntroduction to Business Process Management
Introduction to Business Process ManagementMustafa Jarrar
 
Customer Complaint Ontology
Customer Complaint Ontology Customer Complaint Ontology
Customer Complaint Ontology Mustafa Jarrar
 
Subset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion RulesSubset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion RulesMustafa Jarrar
 
Schema Modularization in ORM
Schema Modularization in ORMSchema Modularization in ORM
Schema Modularization in ORMMustafa Jarrar
 
On Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in PalestineOn Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in PalestineMustafa Jarrar
 
Lessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesLessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesMustafa Jarrar
 
Presentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-finalPresentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-finalMustafa Jarrar
 
Jarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 CallsJarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 CallsMustafa Jarrar
 
Habash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingHabash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingMustafa Jarrar
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Mustafa Jarrar
 
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 ProposalsRiestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 ProposalsMustafa Jarrar
 
Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020Mustafa Jarrar
 
Jarrar: Sparql Project
Jarrar: Sparql ProjectJarrar: Sparql Project
Jarrar: Sparql ProjectMustafa Jarrar
 

Mais de Mustafa Jarrar (20)

Clustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment AnalysisClustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment Analysis
 
Classifying Processes and Basic Formal Ontology
Classifying Processes  and Basic Formal OntologyClassifying Processes  and Basic Formal Ontology
Classifying Processes and Basic Formal Ontology
 
Discrete Mathematics Course Outline
Discrete Mathematics Course OutlineDiscrete Mathematics Course Outline
Discrete Mathematics Course Outline
 
Business Process Implementation
Business Process ImplementationBusiness Process Implementation
Business Process Implementation
 
Business Process Design and Re-engineering
Business Process Design and Re-engineeringBusiness Process Design and Re-engineering
Business Process Design and Re-engineering
 
BPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical ConstructsBPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical Constructs
 
BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs  BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs
 
Introduction to Business Process Management
Introduction to Business Process ManagementIntroduction to Business Process Management
Introduction to Business Process Management
 
Customer Complaint Ontology
Customer Complaint Ontology Customer Complaint Ontology
Customer Complaint Ontology
 
Subset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion RulesSubset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion Rules
 
Schema Modularization in ORM
Schema Modularization in ORMSchema Modularization in ORM
Schema Modularization in ORM
 
On Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in PalestineOn Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in Palestine
 
Lessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesLessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online Courses
 
Presentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-finalPresentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-final
 
Jarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 CallsJarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 Calls
 
Habash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingHabash: Arabic Natural Language Processing
Habash: Arabic Natural Language Processing
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing
 
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 ProposalsRiestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
 
Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020
 
Jarrar: Sparql Project
Jarrar: Sparql ProjectJarrar: Sparql Project
Jarrar: Sparql Project
 

Último

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 

Último (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 

Pal gov.tutorial2.session3.xml schemas

  • 1. ‫أكاديمية الحكومة اإللكترونية الفلسطينية‬ The Palestinian eGovernment Academy www.egovacademy.ps Tutorial II: Data Integration and Open Information Systems Session3 XML Schemas Dr. Ismail M. Romi Palestine Polytechnic University PalGov © 2011 1
  • 2. About This tutorial is part of the PalGov project, funded by the TEMPUS IV program of the Commission of the European Communities, grant agreement 511159-TEMPUS-1- 2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.ps Project Consortium: Birzeit University, Palestine University of Trento, Italy (Coordinator ) Palestine Polytechnic University, Palestine Vrije Universiteit Brussel, Belgium Palestine Technical University, Palestine Université de Savoie, France Ministry of Telecom and IT, Palestine University of Namur, Belgium Ministry of Interior, Palestine TrueTrust, UK Ministry of Local Government, Palestine Coordinator: Dr. Mustafa Jarrar Birzeit University, P.O.Box 14- Birzeit, Palestine Telfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011 2
  • 3. © Copyright Notes Everyone is encouraged to use this material, or part of it, but should properly cite the project (logo and website), and the author of that part. No part of this tutorial may be reproduced or modified in any form or by any means, without prior written permission from the project, who have the full copyrights on the material. Attribution-NonCommercial-ShareAlike CC-BY-NC-SA This license lets others remix, tweak, and build upon your work non- commercially, as long as they credit you and license their new creations under the identical terms. PalGov © 2011 3
  • 4. Tutorial Map Topic h Intended Learning Objectives Session 1: XML Basics and Namespaces 3 A: Knowledge and Understanding Session 2: XML DTD’s 3 2a1: Describe tree and graph data models. Session 3: XML Schemas 3 2a2: Understand the notation of XML, RDF, RDFS, and OWL. Session 4: Lab-XML Schemas 3 2a3: Demonstrate knowledge about querying techniques for data models as SPARQL and XPath. Session 5: RDF and RDFs 3 2a4: Explain the concepts of identity management and Linked data. Session 6: Lab-RDF and RDFs 3 2a5: Demonstrate knowledge about Integration &fusion of Session 7: OWL (Ontology Web Language) 3 heterogeneous data. Session 8: Lab-OWL 3 B: Intellectual Skills Session 9: Lab-RDF Stores -Challenges and Solutions 3 2b1: Represent data using tree and graph data models (XML & Session 10: Lab-SPARQL 3 RDF). Session 11: Lab-Oracle Semantic Technology 3 2b2: Describe data semantics using RDFS and OWL. Session 12_1: The problem of Data Integration 1.5 2b3: Manage and query data represented in RDF, XML, OWL. Session 12_2: Architectural Solutions for the Integration Issues 1.5 2b4: Integrate and fuse heterogeneous data. Session 13_1: Data Schema Integration 1 C: Professional and Practical Skills Session 13_2: GAV and LAV Integration 1 2c1: Using Oracle Semantic Technology and/or Virtuoso to store Session 13_3: Data Integration and Fusion using RDF 1 and query RDF stores. Session 14: Lab-Data Integration and Fusion using RDF 3 D: General and Transferable Skills 2d1: Working with team. Session 15_1: Data Web and Linked Data 1.5 2d2: Presenting and defending ideas. Session 15_2: RDFa 1.5 2d3: Use of creativity and innovation in problem solving. 2d4: Develop communication skills and logical reasoning abilities. Session 16: Lab-RDFa 3 PalGov © 2011 4
  • 5. Session ILO’s: After completing this session students will be able to: •Manage data represented in XML. •Represent data using tree and graph data models. •Build Well-Formed XML Document. PalGov © 2011 5
  • 6. Session4: XML Schemas Session Overview: <Benefits of XML Schemas /> <How to create and use XML Schemas/> <How to document your XML Schemas/> PalGov © 2011 6
  • 7. XML Schema • The term XML Schema is used to refer to the specific W3C XML Schema technology. • W3C XML Schemas, much like DTDs, enable you to describe the structure of an XML document. • XML Schema definitions are also commonly referred to as XSDs. PalGov © 2011 7
  • 8. Benefits of XML Schemas  XML Schemas are created using basic XML, while DTDs utilize a separate syntax.  XML Schemas fully support the Namespace Recommendation.  XML Schemas enable you to validate text element content based on built-in and user-defined data types.  XML Schemas enable you to more easily create complex and reusable content models.  XML Schemas enable the modeling of programming concepts such as object inheritance and type substitution. PalGov © 2011 8
  • 9. Do We Still Need DTDs? • XML Schemas provide better features for describing documents—as well as a more common syntax—they provide no ENTITY functionality. • In many XML documents and applications, the ENTITY declaration is important. • DTD can be embedded in the xml document. • DTD supported by the SGML. PalGov © 2011 9
  • 10. XML Schemas XML Schema divided into three parts:  An introduction to XML Schema concepts at: www.w3.org/TR/xmlschema-0/  A document that defines all of the structures used in XML Schemas at: ww.w3.org/TR/xmlschema-1/  A document that describes XML Schema data types at www.w3.org/TR/xmlschema-2/ PalGov © 2011 10
  • 11. The XML Schema Document • Most XML Schemas are stored within a separate XML document. • XML Schemas function very similarly to external DTDs • XML document contains a reference to the XML Schema that defines its vocabulary. • An XML document that adheres to a particular XML Schema vocabulary is called an XML Schema instance document. PalGov © 2011 11
  • 12. XSD Example <?xml version=‖1.0‖?> <schema xmlns=‖http://www.w3.org/2001/XMLSchema‖ xmlns:target=‖http://www.example.com/name‖ targetNamespace=‖http://www.example.com/name‖ elementFormDefault=‖qualified‖> <element name=‖name‖> <complexType> <sequence> <element name=‖first‖ type=‖string‖/> <element name=‖middle‖ type=‖string‖/> <element name=‖last‖ type=‖string‖/> </sequence> <attribute name=‖title‖ type=‖string‖/> </complexType> </element> </schema> PalGov © 2011 12
  • 13. The <schema> Element The <schema> element is the root element of every XML Schema: <?xml version="1.0"?> <xs:schema> ... ... </xs:schema> PalGov © 2011 13
  • 14. The <schema> Element….Cont  The <schema> element may contain some attributes.  A schema declaration often looks something like this: <?xml version="1.0"?> <xs:schema xmlns:xs= “http://www.w3.org/2001/XMLSchema” targetNamespace= “http://www.w3schools.com” xmlns= “http://www.w3schools.com” elementFormDefault= "qualified"> ... ... </xs:schema> PalGov © 2011 14
  • 15. The XML schema Namespace • You can use any of the following <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”> PalGov © 2011 15
  • 16. • Indicates that the elements and data types used in the schema come from the ―http://www.w3.org/2001/XMLSchema" namespace. • It also specifies that the elements and data types that come from the ―http://www.w3.org/2001/XMLSchema" namespace should be prefixed with xs: or xsd: PalGov © 2011 16
  • 17. Target Namespaces • The primary purpose of XML Schemas is to declare vocabularies. • These vocabularies can be identified by a namespace that is specified in the target namespace attribute. • When declaring a target namespace, it is important to include a matching namespace declaration. <xs:schema xmlns:xs=‖http://www.w3.org/2001/XMLSchema‖ targetNamespace=‖http://www.example.com/name‖ xmlns=‖http://www.example.com/name‖> Indicates the Indicates that the elements defined by this default namespace. schema come from this target namespace. PalGov © 2011 17
  • 18. Element and Attribute Qualification <schema xmlns=‖http://www.w3.org/2001/XMLSchema‖ xmlns:target=‖http://www.example.com/name‖ targetNamespace=‖http://www.example.com/name‖ elementFormDefault=‖qualified‖> elementFromDefault = ―qualified‖ or ―unqualified‖ attributeFromDefault ― qualified‖ or ―unqualified‖ • qualified: if it has an associated namespace. • unqualified: if it hasn’t associated namespaces PalGov © 2011 18
  • 19. Simple <element> Declarations <xs:element name="xxx" type="yyy"/>  xxx: the name of the element • The name must follow the rules for XML names.  yyy: the data type of the element.  XML Schema has a lot of built-in data types.  The most common types are: – xs:string – xs:decimal – xs:integer – xs:boolean – xs:date – xs:time PalGov © 2011 19
  • 20. Example • Here are some simple XML elements: <lastname>Jones</lastname> <age>36</age> <dateborn>1970-03-27</dateborn> • Here are the corresponding simple element definitions: <xs:element name="lastname" type="xs:string"/> <xs:element name="age" type="xs:integer"/> <xs:element name="dateborn" type="xs:date"/> PalGov © 2011 20
  • 21. Cardinality • Cardinality represents the number of occurrences of a specific element within a content model. <element name=‖first‖ type=‖string‖ minOccurs=‖x‖ maxOccurs=‖y‖/> • x : minimum number of occurrence, default =1 • y : maximum number of occurrence, unbound: open occurrence PalGov © 2011 21
  • 22. Default and Fixed Values  Simple elements may have a default value OR a fixed value specified.  Default value is automatically assigned to the element when no other value is specified.  In the following example the default value is "red": <xs:element name="color" type="xs:string" default="red"/>  Fixed value is also automatically assigned to the element, and you cannot specify another value. In the following example the fixed value is "red": <xs:element name="color" type="xs:string" fixed="red"/> PalGov © 2011 22
  • 23. <complexType> Declarations A complex element is an XML element that contains other elements and/or attributes. There are four kinds of complex elements: empty elements elements that contain only other elements elements that contain only text elements that contain both other elements and text Note: Each of these elements may contain attributes as well! PalGov © 2011 23
  • 24. empty elements • A complex XML element, "product", which is empty: <product pid="1345"/> PalGov © 2011 24
  • 25. elements that contain only other elements • A complex XML element, "employee", which contains only other elements: <employee> <firstname>John</firstname> <lastname>Smith</lastname> </employee> PalGov © 2011 25
  • 26. elements that contain only text • A complex XML element, "food", which contains only text: <food type="dessert“ Ice cream</food> PalGov © 2011 26
  • 27. elements that contain both other elements and text • A complex XML element, "description", which contains both elements and text: <description> It happened on <date lang="norwegian">03.03.99</date> .... </description> PalGov © 2011 27
  • 28. How to Define a Complex Element • Look at this complex XML element, "employee", which contains only other elements: <employee> <firstname>John</firstname> <lastname>Smith</lastname> </employee> PalGov © 2011 28
  • 29. The "employee" element can be declared directly by naming the element, like this: <xs:element name="employee"> <xs:complexType> <xs:sequence> <xs:element name="firstname" type="xs:string"/> <xs:element name="lastname“ type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> • If you use the method described above, only the "employee" element can use the specified complex type. • Note that the child elements, "firstname" and "lastname", are surrounded by the <sequence> indicator. This means that the child elements must appear in the same order as they are declared. PalGov © 2011 29
  • 30. <attribute> Declarations • The syntax for defining an attribute is: <xs:attribute name="xxx" type="yyy"/> – Where xxx is the name of the attribute and yyy specifies the data type of the attribute. – Simple elements can’t have attributes PalGov © 2011 30
  • 31. Summary • XML Schema is used to refer to the specific W3C XML Schema technology. • W3C XML Schemas, much like DTDs, enable you to describe the structure of an XML document. PalGov © 2011 31
  • 32. Refrences • Hunter, H, Rafter, J., Fawcett, J., Vlist, E., Ayers, D., Duckett, J., Watt, A., McKinnon,L., (2007), "Beginning XML", 4th Ed.,Wiley Publishing Inc: Indiana, USA. • Ray, E., (2003), "Learning XML", 2nd Ed., O’Rreilly Media Inc.: USA. • Amiano, M., D'Cruz, C., Ethier, K., Thomas, M., (2006), XML: Problem - Design – Solution", Wiley Publishing Inc: Indiana, USA. • http://www.w3.org • http://www.w3schools.com • http://www.xml.com • http://www.xml.org PalGov © 2011 32
  • 33. <e-Gov> Thank you </e-Gov> PalGov © 2011 33