Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Multi-agent Semantic Web SystemsXML
Ewan Klein
MASWS mdash 29 January 2008
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
1 Introduction
2 Structure and Grammars
3 Namespaces
4 RDFXML
5 Conclusion
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
1 Introduction
2 Structure and Grammars
3 Namespaces
4 RDFXML
5 Conclusion
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Tags and Text
If yoursquove ever looked at an HTML document then youalready know a fair amount about XML
Sample HTML
ltheadgtlttitlegtMulti Agent Semantic Web Systemslttitlegt
ltheadgt
XML consists of tags and text
Tags must be paired
They can also be nested
Text is bounded by tags called pcdata (parsed characterdata)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan element
ltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Elements and Nesting
Stuff between (and including) paired tags is called anelement
Elements
lttitlegtMulti Agent Semantic Web Systemslttitlegt isan elementltheadgt ltheadgt is also an element
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 1
Nesting of elements can be used to indicate structure
Example Hierarchical Structure of Text
ltparagtltsgtI thought it was heltsgtltsgtWholtsgtltsgtGodotltsgtltparagt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Nesting and Structure 2
Example Record Structure
ltfilmgtlttitlegtSeven SamurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgtltfilmgtlttitlegtZatoichilttitlegtltdirectorgtTakeshi Kitanoltdirectorgtltdategt2003ltdategtltfilmgt
Title Director DateSeven Samurai Akira Kurosawa 1954
Zatoichi Takeshi Kitano 2003
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Attributes
Start tags can contain attributes mdash name-value pairs
These are often used to refine or qualify the information inthe element
Can only have text as values
Example of Attribute
ltfilmgtlttitle lang=rsquorsquoenrsquorsquogtSeven Samurailttitlegtlttitle lang=rsquorsquojarsquorsquogtShichinin no samurailttitlegtltdirectorgtAkira Kurosawaltdirectorgtltdategt1954ltdategtltfilmgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards display
XML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structure
HTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabulary
XML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML vs HTML
XML and HTML both ways of marking up documents
HTML is oriented towards displayXML is oriented towards structureHTML has a fixed vocabularyXML has an extensible vocabulary
Historically XML developed from SGML (StandardGeneralized Markup Language)
XML is syntactically more constrained and therefore easierto process than SGML
Notion of lsquodocumentrsquo has become very wide including
vector graphics e-commerce transactionmathematical equations object meta-dataserver APIs (Walsh)
XML designed to structure store and transfer data
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Well-formed XML (Not)
ltpgtThis is one ltpgtAnd an-other
Tags have to be closed
ltDategt17-01-2003ltdategt Tags are case-sensitive
ltbgtltigt bold and italicltbgtltigt
Tags must be properlynested
ltimg src=foogifgt Attribute values must bequoted
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DOCTYPE Declaration
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE html
PUBLIC -W3CDTD XHTML 10 TransitionalEN
httpwwww3orgTRxhtml1DTDxhtml1-transitionaldtdgtlthtml xmlns=httpwwww3org1999xhtml xmllang=en-USgtltheadgtlttitlegtResultslttitlegtltheadgtltbody bgcolor=ffffffgtltbodygtlthtmlgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declaration
describes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
DTDs
DTD mdash Document Type Declarationdescribes the syntactic rules of the XML in a document
An XML document is well-formed if the XML has thecorrect syntax
An XML document is valid (with respect to a DTD) if it isboth well-formed and conforms to the rules of the DTD
Two forms of DOCTYPE declaration
SYSTEM URI location of DTD for private use indocument
PUBLIC lsquoglobalrsquo name followed by URI
DOCTYPE declaration used for a SYSTEM DTD
ltxml version=10 encoding=iso-8859-1gtltDOCTYPE letter SYSTEM lsquolsquomydtddtdrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documents
but overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique name
not a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 1
Standard problem
may want to merge two documentsbut overlap in vocabulary (eg element names)
Namespaces
a mechanism for grouping together a collection of nameswhere the group has globally unique namenot a concrete list of names
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 2
Example of Name Clash
ltCustomergtltNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=344gt
ltNamegtDrinking duckltNamegtltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinct
But this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 3
Could we use a URI to make name distinctBut this conflicts with XML rules for element names
Example with URI (Wrong)
ltCustomergtlthttpexamplecomNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)
As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML QNames Again
But it is OK to use XML Qualified Names (QNames)As before we invent an alias for the URI and prefix itusing lsquorsquo as a separator
Example with QName (Correct)
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogtltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergtltProduct productID=rsquorsquo344rsquorsquogtltNamegtDrinking duckltNamegt
ltProductgt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
XML Namespaces 4
Previous example declares per as alias for the URIhttpexampleorgPerson
ltperNamegt not the same as ltNamegt
ltxmlnsgt is a special (pseudo-)attribute for declaringnamespaces
there can be multiple namespace declarations in the sameelement
The xmlns Attribute
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Default Namespaces
The default namespace must be declared
It applies to any subsequent element name that isunqualified (ie lacks a prefix)
Example of default namespace
ltDuckCorp xmlnsper=rsquorsquohttpexampleorgPersonrsquorsquoxmlns=rsquorsquohttpexampleorgProductrsquorsquogt
ltCustomergtltperNamegtltFirstNamegtHomerltFirstNamegtltLastNamegtSimpsonltLastNamegt
ltNamegtltCustomergt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 1
RDF Triples are encoded as rdfDescription elements
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 2
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo element
Resource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo element
URIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 3
RDF Triples are serialized as rdfDescription elements
The Subject is the value of the rdfabout attribute onrdfDescription
The Predicate becomes a child element ofrdfDescription
Objects
Literal Objects are text content of the lsquoPredicatersquo elementResource Objects are values of the rdfresourceattribute of the lsquoPredicatersquo elementURIs have to be written out in full (no QNames) whenthey are attribute values
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 4
RDF Triple with literal Object
edstaff9888 foafname rsquoEwan Kleinrsquo
ElementrdfDescription
Attrrdfabout
Elementfoafname
TextEwan Klein
Texthttp9888
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan KleinltfoafnamegtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
RDF Triples as XML Trees 5
RDF Triples with resource Object
infcoursesmasws dccreator edstaff9888
ElementrdfDescription
Attrrdfabout
Elementdccreator
Attrrdfresource
Texthttp9888
Texthttpmasws
Linear version
ltrdfDescription rdfabout=rsquorsquohttpmaswsrsquorsquogtltdccreator rdfresource=http9888gtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegt
ltrdfDescriptionrsquogtltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogt
ltfoafhomepage rdfresource=httpsimewangtltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Abbreviating Multiple Properties
RDF Triples with shared Subject
edstaff9888 foafname rsquoEwan Kleinrsquoedstaff9888 foafhomepage httpsimewan
Linear version
ltrdfDescription rdfabout=rsquorsquohttp9888rsquorsquogtltfoafnamegtEwan Kleinltfoafnamegtltfoafhomepage rdfresource=httpsimewangt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Blank Nodes
http~kim
mailtokimwannabe
Kim
dccreatorfoafmailbox
foafname
XML version of blank node
ltrdfDescription rdfabout=rsquorsquohttpsimkimrsquorsquogtltdccreator rdfnodeID=abcgtltrdfDescriptiongtltrdfDescription rdfnodeID=abcgt
ltfoafmailbox rdfresource=mailtokimwannabegtltfoafnamegtKimltfoafnamegt
ltrdfDescriptionrsquogt
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Reading
Therersquos too much choice
Antoniou amp van Harmelen Chapter 2
Robert Eckstein (2001) XML Pocket Reference OrsquoReilly
Jenni Tennison (2005) Beginning XSLT 2 0 Apress(Much more than XML An excellent introduction toXSLT)
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languages
documents which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML
Multi-agentSemantic Web
SystemsXML
Ewan Klein
Outline
Introduction
Structure andGrammars
Namespaces
RDFXML
Conclusion
Summary
XML is a ldquometa-markuprdquo language
defines a syntax for a family of markup languagesdocuments which conform to the syntax are well-formedXML
You can design your own language within XML using aDTD
Documents which conform to a DTD are valid XML
Structural markup allows multiple re-use eg XSLT ispowerful language for transforming XML
Namespaces are an important technique when it comes todefining specialised vocabularies in XML-based languages
Both RDF and RDFS have serializations in XML