SlideShare ist ein Scribd-Unternehmen logo
1 von 44
XML Schema (W3C) Jussi Pohjolainen TAMK University of Applied Sciences
XML NAMESPACES ,[object Object]
XML Namespaces ,[object Object],[object Object],<table> <tr> <td>Apples</td> <td>Bananas</td> </tr> </table> <table> <name>African Coffee Table</name> <width>80</width> <length>120</length> </table> Same tag-name, different content and meaning!
Solving Name Conflict ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Prefix  h  has xhtml-related elements and prefix  f  has furniture-related elements
xmlns - attributes ,[object Object],[object Object]
xmlns - attribute ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
xmlns - attribute ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Namespace name ,[object Object],[object Object],[object Object]
Example:  An XHTML + MathML + SVG Profile ,[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
W3C SCHEMA
XML Schema (W3C) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Schema vs. DTD (W3Schools.com) ,[object Object],[object Object],[object Object],[object Object],[object Object]
DTD Linking Defines the structure, tag names and order for all xhtml - documents W3C has created XML-language &quot;XHTML&quot; by defining it's rules in DTD.
DTD Linking Defines the structure, tag names and order for all &quot;book&quot;- documents TAMK has created XML-language &quot;Book&quot; by defining it's rules in DTD.
Schema Linking Defines the structure, tag names and order for all &quot;book&quot;- documents TAMK has created XML-language &quot;Book&quot; by defining it's rules in DTD.
Linking? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Linking and Namespace Usage ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simple Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Let's remove namespaces... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],It doesn't look so confusing after all?
The Basics: Element ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Usage of Datatypes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
minOccurs and maxOccurs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Defining new Datatypes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1) Named Data Type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2) Anonymous Data Type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Benefits of Named Data Type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SimpleType: enumeration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SimpleType: pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REGEX Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Structure of the XML-file ,[object Object],[object Object]
SimpleType vs. ComplexType ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example: XML - File ,[object Object],[object Object],[object Object],[object Object],[object Object]
Example: XSD – file Named ComplexType ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Use now complexType (vs. simpleType)
Example: XSD – file Anonymous ComplexType ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example: ComplexType ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Deep Structure in XML - File ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using Anonymous Data Type: The Horror! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
&quot;There is an error in my schema, could you find it for me?&quot; ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Use Named Datatypes! It's easier to find errors.. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Order of the elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Attribute ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Empty Element with Attribute ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PHP5 and Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Andere mochten auch

Schema presentation
Schema presentationSchema presentation
Schema presentation
l.t.j
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
Sudharsan S
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
Sudharsan S
 

Andere mochten auch (20)

Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Schema presentation
Schema presentationSchema presentation
Schema presentation
 
XSD
XSDXSD
XSD
 
Xsd
XsdXsd
Xsd
 
Xml Schema
Xml SchemaXml Schema
Xml Schema
 
XML Schemas
XML SchemasXML Schemas
XML Schemas
 
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
 
XML Schema Part 1
XML Schema Part 1XML Schema Part 1
XML Schema Part 1
 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2
 
XML
XMLXML
XML
 
Introduction to XSLT
Introduction to XSLTIntroduction to XSLT
Introduction to XSLT
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Learning XSLT
Learning XSLTLearning XSLT
Learning XSLT
 
Tema 2
Tema 2Tema 2
Tema 2
 
J2ee architecture
J2ee architectureJ2ee architecture
J2ee architecture
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
 
Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAP
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 

Mehr von Jussi Pohjolainen

Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
Jussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
Jussi Pohjolainen
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Jussi Pohjolainen
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
Jussi Pohjolainen
 

Mehr von Jussi Pohjolainen (20)

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 

XML Schema (W3C)

  • 1. XML Schema (W3C) Jussi Pohjolainen TAMK University of Applied Sciences
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 12.
  • 13.
  • 14. DTD Linking Defines the structure, tag names and order for all xhtml - documents W3C has created XML-language &quot;XHTML&quot; by defining it's rules in DTD.
  • 15. DTD Linking Defines the structure, tag names and order for all &quot;book&quot;- documents TAMK has created XML-language &quot;Book&quot; by defining it's rules in DTD.
  • 16. Schema Linking Defines the structure, tag names and order for all &quot;book&quot;- documents TAMK has created XML-language &quot;Book&quot; by defining it's rules in DTD.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.