SlideShare a Scribd company logo
1 of 51
Linked Data &
Semantic Web
Technology




                The Semantic Web
                    Part 2. XML


                    Dr. Myungjin Lee
XML
      • What is XML?

      • Basic of XML Document

      • How to make XML Document

      • XML related Recommendations

      • XML Applications




                                        2
Linked Data & Semantic Web Technology
XML
      • What is XML?

      • Basic of XML Document

      • How to make XML Document

      • XML related Recommendations

      • XML Applications




                                        3
Linked Data & Semantic Web Technology
HTML (HyperText Markup Language)
      • designed to display data, with focus on how data looks




                                                                 4
Linked Data & Semantic Web Technology
What is the problem?
                                                   <table>
                                                    <tr>
                                        HTML           <td>AT Car ID</td>
                                                       <td>AT-1209232A</td>
                                                     </tr>
                                                     <tr>
                                                       <td>Price</td>
                                                       <td>Unlisted</td>
                                                     </tr>
                                                     <tr>
                                                       <td>MSRP</td>
                                                       <td>$63,930</td>
                                                     </tr>
                                                     ...




                                                                              ???
                      Business A                                              Business B

                                          Word


      • to exchange information effectively:
                – use text file, not binary file
                – use structured document format


                                                                                           5
Linked Data & Semantic Web Technology
Binary File and Text File
      • Binary File
                – file encoded in binary form for computer storage and processing purposes
                – Problems
                          •    Platform dependence
                          •    Firewalls
                          •    Hard to debug
                          •    Inspecting the file can be hard


      • Text File
                – file structured as a sequence of lines of standardized electronic text
                – Platform independence




                                                                                             6
Linked Data & Semantic Web Technology
Structured Document
      • an electronic document where some method of embedded coding
        is used to give the whole, and parts, of the document various
        structural meanings according to a schema


                                        <title>
                                          W3C Demonstrates …              title           title
                                        </title>
                                        <date>                            date            date
                                          12 February 2013
                                        </date>                                           body
                                        <body>                            body
                                          W3C invites media,
                                          analysts, and other attendees
                                          of Mobile World Congress
                                                                                  bold1   bold1
                                          …
                                                                                  bold2
                                        </body>
                                                                                          bold2

                                              Content                     Structure       Presentation




                                                                                                         7
Linked Data & Semantic Web Technology
XML
      • XML = Extensible + Markup Language
      • a markup language that defines a set of rules for encoding
        documents in a format that is both human-readable and
        machine-readable to be served, received, and processed on
        the Web
      • subset of SGML(Standard Generalized Markup Language)
      • W3C Recommendation 26 November 2008

                                        SGML        Structured
                                                    Document



                                          mark up                     XML


                                                     Simplicity and
                                                       Generality
                                        HTML
                                                                            8
Linked Data & Semantic Web Technology
Markup Language
      • a modern system for annotating a document in a way that is
        syntactically distinguishable from the text

      • History
                – evolved from the "marking up" of manuscripts, i.e., the revision
                  instructions by editors, traditionally written with a blue pencil on authors'
                  manuscripts

                                                                                           Markup
                    Content                                    Content + Markup Language
             XML Basic                                     <title>XML Basic</title>
             Myungjin Lee                    Markup        <author>Myungjin Lee</author>
                                        +   Language
                                                       =
             Li-ST                                         <publisher>Li-ST</publisher>
             100                                           <price>100</price>

                                                                                       Content


                                                                                                    9
Linked Data & Semantic Web Technology
Extensible
      • You can use to create your own markup language.

                                                                              User-define
                                        Pre-difined DTD                       DTD, Schema


                 HTML                                     XML
                 <html>                                   <?xml version=”1.0”?>
                   <body>                                 <booklist>
                     <table>                                <book>
                        <tr>                                  <title>XML Basic</title>
                          <td>XML Basic</td>                  <author>Myungjin Lee</author>
                          <td>Myungjin Lee</td>             </book>
                        </tr>                             </booklist>
                     </table>
                   </body>
                 </html>




                                                                                              10
Linked Data & Semantic Web Technology
Design Goal of XML
      1.  XML shall be straightforwardly usable over the Internet.
      2.  XML shall support a wide variety of applications.
      3.  XML shall be compatible with SGML.
      4.  It shall be easy to write programs which process XML
          documents.
      5. The number of optional features in XML is to be kept to the
          absolute minimum, ideally zero.
      6. XML documents should be human-legible and reasonably clear.
      7. The XML design should be prepared quickly.
      8. The design of XML shall be formal and concise.
      9. XML documents shall be easy to create.
      10. Terseness in XML markup is of minimal importance.

                                                                       11
Linked Data & Semantic Web Technology
Advantage of XML
      •       Simplicity
      •       Generality
      •       Usability
      •       Compatibility
      •       Platform independence
      •       Extensibility
      •       Rendering as different formats
      •       Improvement search system




                                               12
Linked Data & Semantic Web Technology
Summary

                                                 HTML                        SGML                      XML

           Appearance                             1991                        1986                      1998


                                                                                               Information Description
              Purpose                   Information Representation   Information Description
                                                                                                     on the Web


                                                                             strict                     strict
            Grammar                             looseness
                                                                      complex and massive        simple and concise


                  Tag                          pre-defined                 user-define               user-define


           Information
                                                text-base                   tree-base                 tree-base
            Retrieval


           Reusability                           difficult                    easy                      easy



                                                                                                                         13
Linked Data & Semantic Web Technology
XML
      • What is XML?

      • Basic of XML Document

      • How to make XML Document

      • XML related Recommendations

      • XML Applications




                                        14
Linked Data & Semantic Web Technology
Simple XML Document
      • How to write XML Document
                – Open a text editor, such as Notepad
                – Save your XML file as “~.xml”




                                                        15
Linked Data & Semantic Web Technology
Simple XML Document
      • Open your XML file using a web browser, such as IE
      <?xml version="1.0" encoding="euc-kr"?>         <?xml version="1.0" encoding="euc-kr"?>
      <Computer>                                      <Computer>
             <CPU>Pentium 2.0</CPU>                      <CPU>Pentium 2.0</CPU>
             <Memory>512 MB</Memory>                     <Memory>512 MB</mem>
             <GraphicCard>Radeon 9200</GraphicCard>      <GraphicCard>Radeon 9200</GraphicCard>
      </Computer>                                     </Computer>



                                                                                Not well-formed XML

  Well-formed XML




                                                                                                      16
Linked Data & Semantic Web Technology
XML Parser
      • XML Parser
                – reading the XML file/string, getting its content according to the structure, and
                  then providing programming interfaces to user

           <?xml version="1.0"?>
           <Computer>
             <CPU>Pantium 2.0</CPU>
             <Memory>512 MB</Memory>         XML Parser
             <GraphicCard>
               Radeon 9200
             </GraphicCard>
           </Computer>




             XML Document                     User Program                         Result


      • XML Parsers for Programming
                – Microsoft
                          • MSXML
                – Java
                          • SUN JAXP
                          • IBM XML4J


                                                                                                     17
Linked Data & Semantic Web Technology
Well-formed XML and Valid XML
      • Well-formed XML
                – a document that adheres to the syntax rules specified by the XML 1.0
                  specification in that it must satisfy both physical and logical structures
      • Valid XML
                – in addition to being well-formed, XML contains a reference to a
                  Document Type Definition (DTD), and that its elements and attributes are
                  declared in that DTD and follow the grammatical rules for them that the
                  DTD specifies.

                                                                                  Well-Formed XML
                                        followed the                   DTD or     followed the grammatical
               XML 1.0                  syntax rules                 XML Schema   rules of schema
            Recommendation



                                                       Well-Formed
                                                          XML
                                                                                              Valid XML


                                                                                                             18
Linked Data & Semantic Web Technology
Physical Structure of XML Document

   XML Document                                                        Root Element

      Prolog
           XML Declaration                        <?xml version="1.0" encoding="euc-kr"?>

                                                                                      Attribute
                                                  <Computer>
      Body
                                                     <CPU <CPU number="1"> Pantium </CPU>
                                                           number=“1”> Pantium 2.0

                                                     <Memory> 512 MB </Memory>
                                                          <Memory> 512

                                                      <GraphicCard> Radeon 9200 9200
                                                           <GraphicCard> Radeon </GraphicCard>
                                                  </GraphicCard>

                                                  </Computer>
                                        Element




                                                                                                  19
Linked Data & Semantic Web Technology
Logical Structure of XML Document

  <?xml version="1.0" encoding="euc-kr"?>
  <Computer>
         <CPU>Pentium 2.0</CPU>
         <Memory>512 MB</Memory>                    Computer
         <GraphicCard>Radeon 9200</GraphicCard>
                                                                  CPU
  </Computer>
                                                                             Pentium 2.0

                                                                Memory

                                                                               512 MB

                                                               GraphicCard

                                                                             Radeon 9200


                                                  Logical View of XML Document



                                                                                           20
Linked Data & Semantic Web Technology
XML
      • What is XML?

      • Basic of XML Document

      • How to make XML Document

      • XML related Recommendations

      • XML Applications




                                        21
Linked Data & Semantic Web Technology
XML Declaration
      • XML documents may begin by declaring some information about
        themselves.
      <?xml                  version="1.0"         encoding="EUC-KR"              standalone="yes"?>

      • Attributes of XML Declaration
                – version
                          • mandatory
                          • to specify the version of XML document
                – encoding
                          • optional
                          • to specify the encoding style of XML document
                          • default value – “utf-8”
                – standalone
                          • optional
                          • to specify whether if the XML document is linked to external markup declaration
                          • default value – “no”


                                                                                                              22
Linked Data & Semantic Web Technology
Element
      • Basic component of XML document
     Element
                                        < C P U >    P e n t i u m 2 . 0     <    / C P U >


                                         start tag          content               end tag


      • Making Rules
                –     Element consists of start tag, optional content, and end tag.
                –     case-sensitive
                –     Content is optional. – empty element
                –     Elements must be ended with the end tag in correct order.




                                                                                              23
Linked Data & Semantic Web Technology
Element Examples
      1. <?xml version="1.0" encoding="euc-kr"?>

      2. <Book>
      3.    <Title>XML</Title>
      4.    <Title>XML
      5.    <Title>XML</title>
      6.    <Publish></Publish>
      7.    <Publish/>
      8.    <Author><name>Myungjin</name></Author>
      9.    <Author><name>Myungjin</Author></name>

      10.</Book>


                                                     24
Linked Data & Semantic Web Technology
Root Element
      • There is exactly one element, called the root, or document
        element.

            <?xml version="1.0"?>                  <?xml version="1.0"?>
            <Book>                                 <Title>XML</Title>
                   <Title>XML</Title>              <Author>Myungjin Lee</Author>
                   <Author>Myungjin Lee</Author>
            </Book>

                                                   <?xml version="1.0"?>
                                                   This is unvalid XML document.




                                                                                   25
Linked Data & Semantic Web Technology
Attribute
      • XML elements can have zero and more attributes in the start tag.

      • Making Rules
                – An attribute consist of name and value pair.
                – Attributes must be quoted.


                               Attribute Name


      <CPU             number = "3"=            maker = "Intel" > Pantium 2.0 </CPU>


                                                Attribute Value




                                                                                       26
Linked Data & Semantic Web Technology
Attribute Examples
      1. <?xml version="1.0" encoding="euc-kr"?>

      2. <Book>
      3.    <Title number="3">XML</Title>
      4.    <Title number='3'>XML</Title>
      5.    <Title number>XML</Title>
      6.    <Title number=3>XML</Title>
      7. </Book>




                                                   27
Linked Data & Semantic Web Technology
Naming Rules of Element and Attribute
      •       Names can contain letters, numbers, and other characters.
      •       Names must not start with a number or punctuation character.
      •       Names cannot contain spaces.
      •       Names must not start with the letters xml (or XML)
      •       Authors should not use the colon in XML names except for
              namespace purposes




                                                                             28
Linked Data & Semantic Web Technology
Naming Examples
      1. <?xml version="1.0" encoding="euc-kr"?>

      2. <Book>
      3.     <last@name />
      4.     <@#$%^()%+?= />
      5.     <A*2 />
      6.     <1ex />
      7.     <xmlTag />
      8.     <XMLTag />
      9.     < name />
      10. </Book>


                                                   29
Linked Data & Semantic Web Technology
Comments
      • Making Rule
                – Comments start with "<!--" and end with "-->".


           <!-- This is a comment, and it is not processed by XML parser -->



                – Comments may appear anywhere in a document outside other markup.
                – the string " --" (double-hyphen) MUST NOT occur within comments.




                                                                                     30
Linked Data & Semantic Web Technology
Special Characters and CDATA Section
      • XML has a special set of characters that cannot be used in
        normal XML strings.
                –     & - &amp;
                –     < - &lt;
                –     > - &gt;
                –     " - &quot;
                –     ' - &#39;


      • CDATA Section
                – a section of element content that is marked for the parser to interpret as
                  only character data
                – CDATA sections begin with the string " <![CDATA[ " and end with the
                  string " ]]> “.

                    <![CDATA[           Use Special Characters           ]]>


                                                                                               31
Linked Data & Semantic Web Technology
CDATA Section Examples
      1. <?xml version="1.0" encoding="euc-kr"?>

      2. <Code>
      3.    <Line>if (a > b & b < c)</Line>

      4.                  <Line>if (a &gt; b &amp; b &lt; c)</Line>

      5.    <Line><![CDATA[ if (a > b & b < c) ]]></Line>
      6. </Code>




                                                                      32
Linked Data & Semantic Web Technology
Example of XML Document
                ISBN                    X89-89984-06
                 Title                  XML and XML Web Services
               Author                   Myungjin Lee
                 Page                   1000
           Publish Data                 2005. 11. 5.
                Price                   25000 won



                                                 1.    <?xml version="1.0" standalone="yes"?>


                                                 2.    <Book ISBN="X7-82219821-7">
                                                 3.        <Title>XML and XML Web Services</Title>
                                                 4.        <Author>Myungjin Lee</Author>
                                                 5.        <Page>1000</Page>
                                                 6.        <Publish year="2005" month="11" date="5" />
                                                 7.        <Price unit="won">25000</Price>
                                                 8.    </Book>

                                                                                                         33
Linked Data & Semantic Web Technology
XML
      • What is XML?

      • Basic of XML Document

      • How to make XML Document

      • XML related Recommendations

      • XML Applications




                                        34
Linked Data & Semantic Web Technology
XML Namespace
      • Problem of XML
                – pose problems of recognition and collision
                                    <?xml version="1.0" encoding="ISO-8859-15"?>
                                    <html>
                                      <body>
                                        <p>Welcome to my Health Resource</p>
                                      </body>

                                      <body>
                                        <height>6ft</height>
                                        <weight>155 lbs</weight>
                                      </body>
                                    </html>



      • XML Namespace
                – for providing uniquely named elements and attributes in an XML
                  document
                – If each vocabulary is given a namespace, the ambiguity between
                  identically named elements or attributes can be resolved.

                                                                                   35
Linked Data & Semantic Web Technology
How to use XML Namespace
      • XML Namespace Declaration
                – using „xmlns‟ attribute

                            <tagname    xmlns: prefix   = namespace URI   >




      • Applying Namespaces
                – element or attribute name starts with the prefix and ":".

                            < prefix: tagname> ... </ prefix: tagname>




                                                                              36
Linked Data & Semantic Web Technology
XML Namespace Example
      1. <?xml version="1.0" encoding="euc-kr"?>
      2.
      3. <com:Computer xmlns:com="http://www.computer.com">
      4.    <com:CPU>Pantium 2.0</com:CPU>
      5.    <com:Memory>512 MB</com:Memory>
      6.    <com:GraphicCard>
      7.           Radeon 9200
      8.    </com:GraphicCard>
      9. </com:Computer>




                                                              37
Linked Data & Semantic Web Technology
Default Namespace
      • unprefixed declaration of Namespace
      • It applies to all unprefixed element names within its scope.

                               1.       <?xml version="1.0" encoding="euc-kr"?>
                               2.
                               3.       <Computer xmlns="http://www.computer.com">
                               4.           <CPU>Pantium 2.0</CPU>
                               5.           <Memory>512 MB</Memory>
                               6.           <GraphicCard>
                               7.                   Radeon 9200
                               8.           </GraphicCard>
                               9.       </Computer>




                                                                                     38
Linked Data & Semantic Web Technology
XML related Technologies


                                        <title>
                                          W3C Demonstrates …              title           title
                                        </title>
                                        <date>                            date            date
                                          12 February 2013
                                        </date>                                           body
                                        <body>                            body
                                          W3C invites media,
                                          analysts, and other attendees
                                          of Mobile World Congress
                                                                                  bold1   bold1
                                          …
                                                                                  bold2
                                        </body>
                                                                                          bold2

                  Concept                     Content                     Structure       Presentation

            Related                               XML                       DTD                   XSLT
        Recommendations                                                   XML Schema             XSL-FO
                                                                                                  XPath




                                                                                                          39
Linked Data & Semantic Web Technology
How to Define the Structure of XML Document
      • DTD (Document Type Definition)
                – a set of markup declarations that define a document type for an SGML-
                  family markup language


      • XML Schema
                – to express a set of rules to which an XML document must conform in
                  order to be considered 'valid' according to that schema
                – generally to use a prefix :xsd for XML Namespace
                – Comparing with DTD
                          •    XML syntax
                          •    various datatypes and user-define datatype
                          •    various content model and occurrence constraint
                          •    supporting XML Namespace



                                                                                          40
Linked Data & Semantic Web Technology
DTD Example
      1.        <?xml version="1.0" encoding="euc-kr"?>

      2.        <!DOCTYPE Computer [
      3.        <!ELEMENT Computer (CPU, Memory, GraphicCard)>
      4.        <!ELEMENT CPU (#PCDATA)>
      5.        <!ELEMENT Memory (#PCDATA)>
      6.        <!ELEMENT GraphicCard (#PCDATA)>
      7.        ]>

      8. <Computer>
      9.      <CPU>Pantium III</CPU>
      10.     <Memory>512 MB</Memory>
      11.     <GraphicCard>Radeon 9200</GraphicCard>
      12. </Computer>

                                                                 41
Linked Data & Semantic Web Technology
XML Schema Example

  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

                                        elementFormDefault="qualified">

        <xsd:element name="car">
        <xsd:element name="car">
                                                                            <?xml version="1.0"?>
               <xsd:complexType>
                                                                            <car>
                     <xsd:sequence>

                            <xsd:element name="name" type="xsd:string" />       <name>TVlon</name>
                                                                                <name>TVlon</name>

                            <xsd:element name="CC" type="xsd:integer" />
                                                                            <car><CC>2000</CC>
                                                                                 <CC>2000</CC>
                     </xsd:sequence>                                              <name>TVlon</name>
                                                                             </car>
                                                                                  <CC>2000</CC>
               </xsd:complexType>

        </xsd:element>                                                                   XML Document
  </xsd:schema>
                                                     XML Schema Document


                                                                                                       42
Linked Data & Semantic Web Technology
Stylesheet for XML
      • XPath (XML Path Language)
                – a query language for selecting nodes from an XML document


      • XSLT (Extensible Stylesheet Language Transformations)
                – a language for transforming XML documents into other XML documents


      • XSL-FO (XSL Formatting Objects)
                – a markup language for XML document formatting which is most often
                  used to generate PDFs




                                                                                       43
Linked Data & Semantic Web Technology
XSLT and XPath Example
   1.      <?xml version="1.0" encoding="euc-kr" standalone="no"?>

   2.      <?xml-stylesheet type="text/xsl" href="booklist.xsl"?>

   3.      <book isbn="h0-596-00762-0">
   4.        <name outpage="ProgrammingXML.gif">
   5.              Programming XML                     1.<?xml version="1.0" encoding="euc-kr"?>
   6.        </name>
   7.      </book>                                     2.<xsl:stylesheet
                                                       3.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                                                       4.   version="1.0">

                                                       5.   <xsl:output method="html" />

                                                       6. <xsl:template match="/">
                                                       7.   <HTML>
                                                       8.     <BODY>
                                                       9.       <xsl:apply-templates select="book" />
                                                       10.     </BODY>
                                                       11.   </HTML>
                                                       12. </xsl:template>
                                                       13.
                                                       14. <xsl:template match="book">
                                                       15.   <xsl:value-of select="name" />
                                                       16. </xsl:template>

                                                       17.</xsl:stylesheet>




                                                                                                               44
Linked Data & Semantic Web Technology
XML
      • What is XML?

      • Basic of XML Document

      • How to make XML Document

      • XML related Recommendations

      • XML Applications




                                        45
Linked Data & Semantic Web Technology
MathML (Mathematical Markup Language)
      • an application of XML for describing mathematical notations
        and capturing both its structure and content
                                        <math>
                                          <mrow>
                                            <mi>a</mi>
                                            <mo>&#x2062; </mo>
                                            <msup>
                                                 <mi>x</mi>
                                                 <mn>2</mn>
                                            </msup>
                                            <mo>+</mo>
                                            <mi>b</mi>
                                            <mo>&#x2062; </mo>
                                            <mi>x</mi>
                                            <mo>+</mo>
                                            <mi>c</mi>
                                          </mrow>
                                        </math>




                                                                      46
Linked Data & Semantic Web Technology
SVG (Scalable Vector Graphics)
      • an XML-based vector image format for two-dimensional
        graphics that has support for interactivity and animation

          <svg width="100%" height="100%" version="1.1"
                                        xmlns="http://www.w3.org/2000/svg">
                              <rect width="300" height="100“
                                        style="fill:rgb(0,0,255);
                                                stroke-width:1;stroke:rgb(0,0,0)"/>
          </svg>




                                                                                      47
Linked Data & Semantic Web Technology
SyncML (Synchronization Markup Language)
      • the former name for a platform-independent information
        synchronization standard
      • to offer an open standard as a replacement for existing data
        synchronization solutions, which have mostly been somewhat
        vendor-, application- or operating system specific




                                                                       48
Linked Data & Semantic Web Technology
XBRL (Extensible Business Reporting Language)
      • a freely available and global standard for exchanging business
        information with the expression of semantic meaning commonly
        required in business reporting

      • According to the Financial Times, "the Securities and Exchange
        Commission (SEC) in the US, the UK's HM Revenue &
        Customs (HMRC), and Companies House in Singapore have
        begun to require companies to use it, and other regulators are
        following suit.".




                                                                         49
Linked Data & Semantic Web Technology
References
      •       이명진, “소설같은 XML & XML Web Services”, 자북, 2006.
      •       Doug Tidwell, “Tutorial: Introduction to XML”, 1999.
      •       http://www.slideshare.net/pohjus/introduction-to-xml-presentation
      •       http://en.wikipedia.org/wiki/Structured_document
      •       http://en.wikipedia.org/wiki/Markup_language
      •       http://en.wikipedia.org/wiki/Xml
      •       http://en.wikipedia.org/wiki/List_of_XML_markup_languages
      •       http://en.wikipedia.org/wiki/Xml_parser
      •       http://en.wikipedia.org/wiki/Well-formed_document
      •       http://en.wikipedia.org/wiki/CDATA
      •       http://en.wikipedia.org/wiki/Document_Type_Definition
      •       http://en.wikipedia.org/wiki/Xml_namespace
      •       http://en.wikipedia.org/wiki/Xpath
      •       http://en.wikipedia.org/wiki/Xslt
      •       http://en.wikipedia.org/wiki/XSL-FO
      •       http://www.w3.org/TR/xsl/
      •       http://en.wikipedia.org/wiki/List_of_XML_markup_languages
      •       http://en.wikipedia.org/wiki/Mathml
      •       http://en.wikipedia.org/wiki/Svg
      •       http://en.wikipedia.org/wiki/Syncml
      •       http://en.wikipedia.org/wiki/XBRL




                                                                                  50
Linked Data & Semantic Web Technology
Dr. Myungjin Lee
                          e-Mail : mjlee@li-st.com
        Twitter : http://twitter.com/MyungjinLee
   Facebook : http://www.facebook.com/mjinlee
SlideShare : http://www.slideshare.net/onlyjiny/
                                             51
                                               51

More Related Content

Similar to The Semantic Web #2 - XML

Similar to The Semantic Web #2 - XML (20)

Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
INFT132 093 04 HTML and XHTML
INFT132 093 04 HTML and XHTMLINFT132 093 04 HTML and XHTML
INFT132 093 04 HTML and XHTML
 
Xml
XmlXml
Xml
 
Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)
 
Xml
XmlXml
Xml
 
01 - Web Programming Intro.pptx
01 - Web Programming Intro.pptx01 - Web Programming Intro.pptx
01 - Web Programming Intro.pptx
 
8023.ppt
8023.ppt8023.ppt
8023.ppt
 
DOM-XML
DOM-XMLDOM-XML
DOM-XML
 
[Case Study] - Nuclear Power, DITA and FrameMaker: The How's and Why's
[Case Study] - Nuclear Power, DITA and FrameMaker: The How's and Why's[Case Study] - Nuclear Power, DITA and FrameMaker: The How's and Why's
[Case Study] - Nuclear Power, DITA and FrameMaker: The How's and Why's
 
MBE Summit 2012
MBE Summit 2012MBE Summit 2012
MBE Summit 2012
 
Data interchange integration, HTML XML Biological XML DTD
Data interchange integration, HTML XML Biological XML DTDData interchange integration, HTML XML Biological XML DTD
Data interchange integration, HTML XML Biological XML DTD
 
Web data management
Web data managementWeb data management
Web data management
 
Validating Xml
Validating XmlValidating Xml
Validating Xml
 
XML Databases
XML DatabasesXML Databases
XML Databases
 
Ncp computer appls web tech asish
Ncp computer appls  web tech asishNcp computer appls  web tech asish
Ncp computer appls web tech asish
 
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
 
XML, XML Databases and MPEG-7
XML, XML Databases and MPEG-7XML, XML Databases and MPEG-7
XML, XML Databases and MPEG-7
 
Xml
XmlXml
Xml
 
What “Model” DITA Specializations Can Teach About Information Modelinc
What “Model” DITA Specializations Can Teach About Information ModelincWhat “Model” DITA Specializations Can Teach About Information Modelinc
What “Model” DITA Specializations Can Teach About Information Modelinc
 

More from Myungjin Lee

지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)Myungjin Lee
 
JSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSPJSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSPMyungjin Lee
 
JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본Myungjin Lee
 
JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿Myungjin Lee
 
JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기Myungjin Lee
 
JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍Myungjin Lee
 
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)Myungjin Lee
 
오픈 데이터와 인공지능
오픈 데이터와 인공지능오픈 데이터와 인공지능
오픈 데이터와 인공지능Myungjin Lee
 
법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색Myungjin Lee
 
도서관과 Linked Data
도서관과 Linked Data도서관과 Linked Data
도서관과 Linked DataMyungjin Lee
 
공공데이터, 현재 우리는?
공공데이터, 현재 우리는?공공데이터, 현재 우리는?
공공데이터, 현재 우리는?Myungjin Lee
 
LODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data WorkshopLODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data WorkshopMyungjin Lee
 
Introduction of Deep Learning
Introduction of Deep LearningIntroduction of Deep Learning
Introduction of Deep LearningMyungjin Lee
 
쉽게 이해하는 LOD
쉽게 이해하는 LOD쉽게 이해하는 LOD
쉽게 이해하는 LODMyungjin Lee
 
서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스Myungjin Lee
 
LOD(Linked Open Data) Recommendations
LOD(Linked Open Data) RecommendationsLOD(Linked Open Data) Recommendations
LOD(Linked Open Data) RecommendationsMyungjin Lee
 
Interlinking for Linked Data
Interlinking for Linked DataInterlinking for Linked Data
Interlinking for Linked DataMyungjin Lee
 
Linked Open Data Tutorial
Linked Open Data TutorialLinked Open Data Tutorial
Linked Open Data TutorialMyungjin Lee
 
Linked Data Usecases
Linked Data UsecasesLinked Data Usecases
Linked Data UsecasesMyungjin Lee
 
공공데이터와 Linked open data
공공데이터와 Linked open data공공데이터와 Linked open data
공공데이터와 Linked open dataMyungjin Lee
 

More from Myungjin Lee (20)

지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
 
JSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSPJSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSP
 
JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본
 
JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿
 
JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기
 
JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍
 
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
 
오픈 데이터와 인공지능
오픈 데이터와 인공지능오픈 데이터와 인공지능
오픈 데이터와 인공지능
 
법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색
 
도서관과 Linked Data
도서관과 Linked Data도서관과 Linked Data
도서관과 Linked Data
 
공공데이터, 현재 우리는?
공공데이터, 현재 우리는?공공데이터, 현재 우리는?
공공데이터, 현재 우리는?
 
LODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data WorkshopLODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data Workshop
 
Introduction of Deep Learning
Introduction of Deep LearningIntroduction of Deep Learning
Introduction of Deep Learning
 
쉽게 이해하는 LOD
쉽게 이해하는 LOD쉽게 이해하는 LOD
쉽게 이해하는 LOD
 
서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스
 
LOD(Linked Open Data) Recommendations
LOD(Linked Open Data) RecommendationsLOD(Linked Open Data) Recommendations
LOD(Linked Open Data) Recommendations
 
Interlinking for Linked Data
Interlinking for Linked DataInterlinking for Linked Data
Interlinking for Linked Data
 
Linked Open Data Tutorial
Linked Open Data TutorialLinked Open Data Tutorial
Linked Open Data Tutorial
 
Linked Data Usecases
Linked Data UsecasesLinked Data Usecases
Linked Data Usecases
 
공공데이터와 Linked open data
공공데이터와 Linked open data공공데이터와 Linked open data
공공데이터와 Linked open data
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 

The Semantic Web #2 - XML

  • 1. Linked Data & Semantic Web Technology The Semantic Web Part 2. XML Dr. Myungjin Lee
  • 2. XML • What is XML? • Basic of XML Document • How to make XML Document • XML related Recommendations • XML Applications 2 Linked Data & Semantic Web Technology
  • 3. XML • What is XML? • Basic of XML Document • How to make XML Document • XML related Recommendations • XML Applications 3 Linked Data & Semantic Web Technology
  • 4. HTML (HyperText Markup Language) • designed to display data, with focus on how data looks 4 Linked Data & Semantic Web Technology
  • 5. What is the problem? <table> <tr> HTML <td>AT Car ID</td> <td>AT-1209232A</td> </tr> <tr> <td>Price</td> <td>Unlisted</td> </tr> <tr> <td>MSRP</td> <td>$63,930</td> </tr> ... ??? Business A Business B Word • to exchange information effectively: – use text file, not binary file – use structured document format 5 Linked Data & Semantic Web Technology
  • 6. Binary File and Text File • Binary File – file encoded in binary form for computer storage and processing purposes – Problems • Platform dependence • Firewalls • Hard to debug • Inspecting the file can be hard • Text File – file structured as a sequence of lines of standardized electronic text – Platform independence 6 Linked Data & Semantic Web Technology
  • 7. Structured Document • an electronic document where some method of embedded coding is used to give the whole, and parts, of the document various structural meanings according to a schema <title> W3C Demonstrates … title title </title> <date> date date 12 February 2013 </date> body <body> body W3C invites media, analysts, and other attendees of Mobile World Congress bold1 bold1 … bold2 </body> bold2 Content Structure Presentation 7 Linked Data & Semantic Web Technology
  • 8. XML • XML = Extensible + Markup Language • a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable to be served, received, and processed on the Web • subset of SGML(Standard Generalized Markup Language) • W3C Recommendation 26 November 2008 SGML Structured Document mark up XML Simplicity and Generality HTML 8 Linked Data & Semantic Web Technology
  • 9. Markup Language • a modern system for annotating a document in a way that is syntactically distinguishable from the text • History – evolved from the "marking up" of manuscripts, i.e., the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts Markup Content Content + Markup Language XML Basic <title>XML Basic</title> Myungjin Lee Markup <author>Myungjin Lee</author> + Language = Li-ST <publisher>Li-ST</publisher> 100 <price>100</price> Content 9 Linked Data & Semantic Web Technology
  • 10. Extensible • You can use to create your own markup language. User-define Pre-difined DTD DTD, Schema HTML XML <html> <?xml version=”1.0”?> <body> <booklist> <table> <book> <tr> <title>XML Basic</title> <td>XML Basic</td> <author>Myungjin Lee</author> <td>Myungjin Lee</td> </book> </tr> </booklist> </table> </body> </html> 10 Linked Data & Semantic Web Technology
  • 11. Design Goal of XML 1. XML shall be straightforwardly usable over the Internet. 2. XML shall support a wide variety of applications. 3. XML shall be compatible with SGML. 4. It shall be easy to write programs which process XML documents. 5. The number of optional features in XML is to be kept to the absolute minimum, ideally zero. 6. XML documents should be human-legible and reasonably clear. 7. The XML design should be prepared quickly. 8. The design of XML shall be formal and concise. 9. XML documents shall be easy to create. 10. Terseness in XML markup is of minimal importance. 11 Linked Data & Semantic Web Technology
  • 12. Advantage of XML • Simplicity • Generality • Usability • Compatibility • Platform independence • Extensibility • Rendering as different formats • Improvement search system 12 Linked Data & Semantic Web Technology
  • 13. Summary HTML SGML XML Appearance 1991 1986 1998 Information Description Purpose Information Representation Information Description on the Web strict strict Grammar looseness complex and massive simple and concise Tag pre-defined user-define user-define Information text-base tree-base tree-base Retrieval Reusability difficult easy easy 13 Linked Data & Semantic Web Technology
  • 14. XML • What is XML? • Basic of XML Document • How to make XML Document • XML related Recommendations • XML Applications 14 Linked Data & Semantic Web Technology
  • 15. Simple XML Document • How to write XML Document – Open a text editor, such as Notepad – Save your XML file as “~.xml” 15 Linked Data & Semantic Web Technology
  • 16. Simple XML Document • Open your XML file using a web browser, such as IE <?xml version="1.0" encoding="euc-kr"?> <?xml version="1.0" encoding="euc-kr"?> <Computer> <Computer> <CPU>Pentium 2.0</CPU> <CPU>Pentium 2.0</CPU> <Memory>512 MB</Memory> <Memory>512 MB</mem> <GraphicCard>Radeon 9200</GraphicCard> <GraphicCard>Radeon 9200</GraphicCard> </Computer> </Computer> Not well-formed XML Well-formed XML 16 Linked Data & Semantic Web Technology
  • 17. XML Parser • XML Parser – reading the XML file/string, getting its content according to the structure, and then providing programming interfaces to user <?xml version="1.0"?> <Computer> <CPU>Pantium 2.0</CPU> <Memory>512 MB</Memory> XML Parser <GraphicCard> Radeon 9200 </GraphicCard> </Computer> XML Document User Program Result • XML Parsers for Programming – Microsoft • MSXML – Java • SUN JAXP • IBM XML4J 17 Linked Data & Semantic Web Technology
  • 18. Well-formed XML and Valid XML • Well-formed XML – a document that adheres to the syntax rules specified by the XML 1.0 specification in that it must satisfy both physical and logical structures • Valid XML – in addition to being well-formed, XML contains a reference to a Document Type Definition (DTD), and that its elements and attributes are declared in that DTD and follow the grammatical rules for them that the DTD specifies. Well-Formed XML followed the DTD or followed the grammatical XML 1.0 syntax rules XML Schema rules of schema Recommendation Well-Formed XML Valid XML 18 Linked Data & Semantic Web Technology
  • 19. Physical Structure of XML Document XML Document Root Element Prolog XML Declaration <?xml version="1.0" encoding="euc-kr"?> Attribute <Computer> Body <CPU <CPU number="1"> Pantium </CPU> number=“1”> Pantium 2.0 <Memory> 512 MB </Memory> <Memory> 512 <GraphicCard> Radeon 9200 9200 <GraphicCard> Radeon </GraphicCard> </GraphicCard> </Computer> Element 19 Linked Data & Semantic Web Technology
  • 20. Logical Structure of XML Document <?xml version="1.0" encoding="euc-kr"?> <Computer> <CPU>Pentium 2.0</CPU> <Memory>512 MB</Memory> Computer <GraphicCard>Radeon 9200</GraphicCard> CPU </Computer> Pentium 2.0 Memory 512 MB GraphicCard Radeon 9200 Logical View of XML Document 20 Linked Data & Semantic Web Technology
  • 21. XML • What is XML? • Basic of XML Document • How to make XML Document • XML related Recommendations • XML Applications 21 Linked Data & Semantic Web Technology
  • 22. XML Declaration • XML documents may begin by declaring some information about themselves. <?xml version="1.0" encoding="EUC-KR" standalone="yes"?> • Attributes of XML Declaration – version • mandatory • to specify the version of XML document – encoding • optional • to specify the encoding style of XML document • default value – “utf-8” – standalone • optional • to specify whether if the XML document is linked to external markup declaration • default value – “no” 22 Linked Data & Semantic Web Technology
  • 23. Element • Basic component of XML document Element < C P U > P e n t i u m 2 . 0 < / C P U > start tag content end tag • Making Rules – Element consists of start tag, optional content, and end tag. – case-sensitive – Content is optional. – empty element – Elements must be ended with the end tag in correct order. 23 Linked Data & Semantic Web Technology
  • 24. Element Examples 1. <?xml version="1.0" encoding="euc-kr"?> 2. <Book> 3. <Title>XML</Title> 4. <Title>XML 5. <Title>XML</title> 6. <Publish></Publish> 7. <Publish/> 8. <Author><name>Myungjin</name></Author> 9. <Author><name>Myungjin</Author></name> 10.</Book> 24 Linked Data & Semantic Web Technology
  • 25. Root Element • There is exactly one element, called the root, or document element. <?xml version="1.0"?> <?xml version="1.0"?> <Book> <Title>XML</Title> <Title>XML</Title> <Author>Myungjin Lee</Author> <Author>Myungjin Lee</Author> </Book> <?xml version="1.0"?> This is unvalid XML document. 25 Linked Data & Semantic Web Technology
  • 26. Attribute • XML elements can have zero and more attributes in the start tag. • Making Rules – An attribute consist of name and value pair. – Attributes must be quoted. Attribute Name <CPU number = "3"= maker = "Intel" > Pantium 2.0 </CPU> Attribute Value 26 Linked Data & Semantic Web Technology
  • 27. Attribute Examples 1. <?xml version="1.0" encoding="euc-kr"?> 2. <Book> 3. <Title number="3">XML</Title> 4. <Title number='3'>XML</Title> 5. <Title number>XML</Title> 6. <Title number=3>XML</Title> 7. </Book> 27 Linked Data & Semantic Web Technology
  • 28. Naming Rules of Element and Attribute • Names can contain letters, numbers, and other characters. • Names must not start with a number or punctuation character. • Names cannot contain spaces. • Names must not start with the letters xml (or XML) • Authors should not use the colon in XML names except for namespace purposes 28 Linked Data & Semantic Web Technology
  • 29. Naming Examples 1. <?xml version="1.0" encoding="euc-kr"?> 2. <Book> 3. <last@name /> 4. <@#$%^()%+?= /> 5. <A*2 /> 6. <1ex /> 7. <xmlTag /> 8. <XMLTag /> 9. < name /> 10. </Book> 29 Linked Data & Semantic Web Technology
  • 30. Comments • Making Rule – Comments start with "<!--" and end with "-->". <!-- This is a comment, and it is not processed by XML parser --> – Comments may appear anywhere in a document outside other markup. – the string " --" (double-hyphen) MUST NOT occur within comments. 30 Linked Data & Semantic Web Technology
  • 31. Special Characters and CDATA Section • XML has a special set of characters that cannot be used in normal XML strings. – & - &amp; – < - &lt; – > - &gt; – " - &quot; – ' - &#39; • CDATA Section – a section of element content that is marked for the parser to interpret as only character data – CDATA sections begin with the string " <![CDATA[ " and end with the string " ]]> “. <![CDATA[ Use Special Characters ]]> 31 Linked Data & Semantic Web Technology
  • 32. CDATA Section Examples 1. <?xml version="1.0" encoding="euc-kr"?> 2. <Code> 3. <Line>if (a > b & b < c)</Line> 4. <Line>if (a &gt; b &amp; b &lt; c)</Line> 5. <Line><![CDATA[ if (a > b & b < c) ]]></Line> 6. </Code> 32 Linked Data & Semantic Web Technology
  • 33. Example of XML Document ISBN X89-89984-06 Title XML and XML Web Services Author Myungjin Lee Page 1000 Publish Data 2005. 11. 5. Price 25000 won 1. <?xml version="1.0" standalone="yes"?> 2. <Book ISBN="X7-82219821-7"> 3. <Title>XML and XML Web Services</Title> 4. <Author>Myungjin Lee</Author> 5. <Page>1000</Page> 6. <Publish year="2005" month="11" date="5" /> 7. <Price unit="won">25000</Price> 8. </Book> 33 Linked Data & Semantic Web Technology
  • 34. XML • What is XML? • Basic of XML Document • How to make XML Document • XML related Recommendations • XML Applications 34 Linked Data & Semantic Web Technology
  • 35. XML Namespace • Problem of XML – pose problems of recognition and collision <?xml version="1.0" encoding="ISO-8859-15"?> <html> <body> <p>Welcome to my Health Resource</p> </body> <body> <height>6ft</height> <weight>155 lbs</weight> </body> </html> • XML Namespace – for providing uniquely named elements and attributes in an XML document – If each vocabulary is given a namespace, the ambiguity between identically named elements or attributes can be resolved. 35 Linked Data & Semantic Web Technology
  • 36. How to use XML Namespace • XML Namespace Declaration – using „xmlns‟ attribute <tagname xmlns: prefix = namespace URI > • Applying Namespaces – element or attribute name starts with the prefix and ":". < prefix: tagname> ... </ prefix: tagname> 36 Linked Data & Semantic Web Technology
  • 37. XML Namespace Example 1. <?xml version="1.0" encoding="euc-kr"?> 2. 3. <com:Computer xmlns:com="http://www.computer.com"> 4. <com:CPU>Pantium 2.0</com:CPU> 5. <com:Memory>512 MB</com:Memory> 6. <com:GraphicCard> 7. Radeon 9200 8. </com:GraphicCard> 9. </com:Computer> 37 Linked Data & Semantic Web Technology
  • 38. Default Namespace • unprefixed declaration of Namespace • It applies to all unprefixed element names within its scope. 1. <?xml version="1.0" encoding="euc-kr"?> 2. 3. <Computer xmlns="http://www.computer.com"> 4. <CPU>Pantium 2.0</CPU> 5. <Memory>512 MB</Memory> 6. <GraphicCard> 7. Radeon 9200 8. </GraphicCard> 9. </Computer> 38 Linked Data & Semantic Web Technology
  • 39. XML related Technologies <title> W3C Demonstrates … title title </title> <date> date date 12 February 2013 </date> body <body> body W3C invites media, analysts, and other attendees of Mobile World Congress bold1 bold1 … bold2 </body> bold2 Concept Content Structure Presentation Related XML DTD XSLT Recommendations XML Schema XSL-FO XPath 39 Linked Data & Semantic Web Technology
  • 40. How to Define the Structure of XML Document • DTD (Document Type Definition) – a set of markup declarations that define a document type for an SGML- family markup language • XML Schema – to express a set of rules to which an XML document must conform in order to be considered 'valid' according to that schema – generally to use a prefix :xsd for XML Namespace – Comparing with DTD • XML syntax • various datatypes and user-define datatype • various content model and occurrence constraint • supporting XML Namespace 40 Linked Data & Semantic Web Technology
  • 41. DTD Example 1. <?xml version="1.0" encoding="euc-kr"?> 2. <!DOCTYPE Computer [ 3. <!ELEMENT Computer (CPU, Memory, GraphicCard)> 4. <!ELEMENT CPU (#PCDATA)> 5. <!ELEMENT Memory (#PCDATA)> 6. <!ELEMENT GraphicCard (#PCDATA)> 7. ]> 8. <Computer> 9. <CPU>Pantium III</CPU> 10. <Memory>512 MB</Memory> 11. <GraphicCard>Radeon 9200</GraphicCard> 12. </Computer> 41 Linked Data & Semantic Web Technology
  • 42. XML Schema Example <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="car"> <xsd:element name="car"> <?xml version="1.0"?> <xsd:complexType> <car> <xsd:sequence> <xsd:element name="name" type="xsd:string" /> <name>TVlon</name> <name>TVlon</name> <xsd:element name="CC" type="xsd:integer" /> <car><CC>2000</CC> <CC>2000</CC> </xsd:sequence> <name>TVlon</name> </car> <CC>2000</CC> </xsd:complexType> </xsd:element> XML Document </xsd:schema> XML Schema Document 42 Linked Data & Semantic Web Technology
  • 43. Stylesheet for XML • XPath (XML Path Language) – a query language for selecting nodes from an XML document • XSLT (Extensible Stylesheet Language Transformations) – a language for transforming XML documents into other XML documents • XSL-FO (XSL Formatting Objects) – a markup language for XML document formatting which is most often used to generate PDFs 43 Linked Data & Semantic Web Technology
  • 44. XSLT and XPath Example 1. <?xml version="1.0" encoding="euc-kr" standalone="no"?> 2. <?xml-stylesheet type="text/xsl" href="booklist.xsl"?> 3. <book isbn="h0-596-00762-0"> 4. <name outpage="ProgrammingXML.gif"> 5. Programming XML 1.<?xml version="1.0" encoding="euc-kr"?> 6. </name> 7. </book> 2.<xsl:stylesheet 3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4. version="1.0"> 5. <xsl:output method="html" /> 6. <xsl:template match="/"> 7. <HTML> 8. <BODY> 9. <xsl:apply-templates select="book" /> 10. </BODY> 11. </HTML> 12. </xsl:template> 13. 14. <xsl:template match="book"> 15. <xsl:value-of select="name" /> 16. </xsl:template> 17.</xsl:stylesheet> 44 Linked Data & Semantic Web Technology
  • 45. XML • What is XML? • Basic of XML Document • How to make XML Document • XML related Recommendations • XML Applications 45 Linked Data & Semantic Web Technology
  • 46. MathML (Mathematical Markup Language) • an application of XML for describing mathematical notations and capturing both its structure and content <math> <mrow> <mi>a</mi> <mo>&#x2062; </mo> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <mi>b</mi> <mo>&#x2062; </mo> <mi>x</mi> <mo>+</mo> <mi>c</mi> </mrow> </math> 46 Linked Data & Semantic Web Technology
  • 47. SVG (Scalable Vector Graphics) • an XML-based vector image format for two-dimensional graphics that has support for interactivity and animation <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100“ style="fill:rgb(0,0,255); stroke-width:1;stroke:rgb(0,0,0)"/> </svg> 47 Linked Data & Semantic Web Technology
  • 48. SyncML (Synchronization Markup Language) • the former name for a platform-independent information synchronization standard • to offer an open standard as a replacement for existing data synchronization solutions, which have mostly been somewhat vendor-, application- or operating system specific 48 Linked Data & Semantic Web Technology
  • 49. XBRL (Extensible Business Reporting Language) • a freely available and global standard for exchanging business information with the expression of semantic meaning commonly required in business reporting • According to the Financial Times, "the Securities and Exchange Commission (SEC) in the US, the UK's HM Revenue & Customs (HMRC), and Companies House in Singapore have begun to require companies to use it, and other regulators are following suit.". 49 Linked Data & Semantic Web Technology
  • 50. References • 이명진, “소설같은 XML & XML Web Services”, 자북, 2006. • Doug Tidwell, “Tutorial: Introduction to XML”, 1999. • http://www.slideshare.net/pohjus/introduction-to-xml-presentation • http://en.wikipedia.org/wiki/Structured_document • http://en.wikipedia.org/wiki/Markup_language • http://en.wikipedia.org/wiki/Xml • http://en.wikipedia.org/wiki/List_of_XML_markup_languages • http://en.wikipedia.org/wiki/Xml_parser • http://en.wikipedia.org/wiki/Well-formed_document • http://en.wikipedia.org/wiki/CDATA • http://en.wikipedia.org/wiki/Document_Type_Definition • http://en.wikipedia.org/wiki/Xml_namespace • http://en.wikipedia.org/wiki/Xpath • http://en.wikipedia.org/wiki/Xslt • http://en.wikipedia.org/wiki/XSL-FO • http://www.w3.org/TR/xsl/ • http://en.wikipedia.org/wiki/List_of_XML_markup_languages • http://en.wikipedia.org/wiki/Mathml • http://en.wikipedia.org/wiki/Svg • http://en.wikipedia.org/wiki/Syncml • http://en.wikipedia.org/wiki/XBRL 50 Linked Data & Semantic Web Technology
  • 51. Dr. Myungjin Lee e-Mail : mjlee@li-st.com Twitter : http://twitter.com/MyungjinLee Facebook : http://www.facebook.com/mjinlee SlideShare : http://www.slideshare.net/onlyjiny/ 51 51