xml extensible markup language. markup languages u what does this number (100) mean? –actually,...
TRANSCRIPT
XML
Extensible Markup Language
Markup Languages
What does this number (100) mean?– Actually, it’s just a string of characters!– A markup language can be used to distinguish
this string of characters from other strings and to add some meaning to it
A markup language is simply a computer language of codes and tags (a.k.a. containers)
<weight>100</weight>
Markup for Web Pages
The standard markup language used to create Web pages is HTML– HTML (HyperText Markup Language)
A fixed set of tags (elements … containers) that tell a Web browser how to display a document containing text and data
<title> Contains your document’s title</title> <body> Contains your document’s information <center>For centering things</center> <h1>For large text</h1> </body>
HTML (continued) <html> <head> <title> My Web document </title> </head> <body> <center> <h1> My professor’s weight is 100</h1> </center> </body> </html>
HTML is used to display documents with a web browser, but HTML cannot be used by other applications because it does not add any INFORMATION about the data being transmitted.
XML: eXtensible Markup Language Extensible: that which can be extended, it is
flexible, and can be added to. XML adds meaning or context to the data that is
being transmitted.– <weight>100</weight>
Because XML can be used to describe data, businesses are beginning to adopt it as the “new” standard for EDI (Electronic Data Interchange). XML is directly usable over the Internet and it can be used to store, deliver, and exchange information over and between networks.
How Would You Describe
A person– Last Name– First Name– Age– Gender– Hair Color– Weight– Height– Birthdate– College Major
A building at KSU– Name– Location– When Built– Architect– Primary College Using the Building
A university in the Big 12– Name– City– State– Mascot– Abbreviation– Color (primary school color)
(an XML instance
document)
<?xml version=“1.0”?> <SelectedBig12Universities>
– <University> <name>Kansas State University</name> <city>Manhattan</city> <state>Kansas</state> <mascot>Wildcat</mascot> <abbreviation> KSU</abbreviation> <color> Purple</color>
– </University>– <University>
<name> University of Kansas</name> <city>Lawrence</city> <state>Kansas</state> <mascot> Jayhawk </mascot> <abbreviation> KU</abbreviation> <color> Blue</color>
– </University> </SelectedBig12Universities>
Instance Document
A tree hierarchy that describes the overall data content
SelectedBig12Universities
University University University
Name City State Mascot
Abbreviation Color
Name City State Mascot
Abbreviation Color
Name City State Mascot
Abbreviation Color
Root element: Selected Big 12 Universities
Mid-level elements: individual universities
Individual data content
Core XML Technologies The XML Instance document
– Stores data in a hierarchical format– XML Instance documents are the heart of XML.
XML Schemas– Defines the structure of a valid XML instance document and
the types of values that elements may hold.– XML Schemas are used to validate the XML instance
documents. Someone who has your schema knows what the information that you will be sending them or exchanging with them will look like.
XSL (the extensible Stylesheet Language)– Describes how the XML data should be displayed– Used to convert an XML instance document from one format to another.
Some of the formatting can be undertaken using HTML.
An XML Instance Document
<?xml version=“1.0”?> <SelectedBig12Universities>
– <University> <name>Kansas State University</name> <city>Manhattan</city> <state>Kansas</state> <mascot>Wildcat</mascot> <abbreviation> KSU</abbreviation> <color> Purple</color>
– </University>– <University>
<name> University of Kansas</name> <city>Lawrence</city> <state>Kansas</state> <mascot> Jayhawk </mascot> <abbreviation> KU</abbreviation> <color> Blue</color>
– </University> </SelectedBig12Universities>
Follows a hierarchical format that you can expand or collapse
Link
Inventory Schema
A description of the rules that“valid” XMLinstance documents mustfollow.
Applicationsthat understanda schema know what to expect and can process any associated, valid documents. Schemas define the content, organization, and structure of valid instance documents.
Schema in e-business If you are an e-business and you want to share and
automatically process xml documents with your business partners, you will need schemas to define the rules that your instance documents follow and the rules that your partners’ documents follow. You will share your schemas with your business partners so that all of you can accurately process each others’ XML documents.
XBRL (eXtensible Business Reporting Language) is a specific XML schema that describes the elements/data in financial statements.
Schema in e-business Accounting firms and government agencies are
working on schemas used to distribute financial reports.
Schemas are being developed to facilitate the transfer of financial information between banks, businesses, and customers.
e-Businesses are developing schemas to transfer business transaction information via the Internet.
The IRS is developing schemas for tax reporting and electronic filing.
XBRL (eXtensible Business Reporting Language) is a specific XML schema that describes the elements/data in financial statements.
Language of Love for Mutual FundsXBRL (eXtensible Business Reporting Language)
• XBRL is one of the XML schemas (a specific set of rules that documents of a certain type must follow)
• If your organization is required to report data to a regulatory body, they will dictate the rules that you have to follow when doing your reporting. That is where schemas come into play.
• If data has been “tagged” using XML/XBRL, then it is very easy to pull relevant data from long reports/filings, and then be able to analyze and compare data across many different sources.– After some sort of computer program is created, with the click of a
mouse, an XML processor can retrieve tagged data from whatever data repository it is in
Used to format instance
documents
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match = "/"><HTML><TABLE BORDER = "1">
<xsl:for-each select="inventory/item"><TR><TD> <xsl:value-of select="."/> </TD></TR></xsl:for-each>
</TABLE></HTML></xsl:template>
</xsl:stylesheet>
The XSL Stylesheet
XSL Stylesheet
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match = "/"><HTML><TABLE BORDER = "1"><TR><TH>Item</TH> <TH>Cost</TH> <TH>QOH</TH> <TH>TOTAL</TH></TR>
<xsl:for-each select="inventory/item"><TR><TD> <xsl:value-of select="name"/> </TD><TD> <xsl:value-of select="cost"/> </TD><TD> <xsl:value-of select="qoh"/> </TD><TD> <xsl:value-of select="cost * qoh"/> </TD></TR></xsl:for-each>
</TABLE></HTML>
</xsl:template></xsl:stylesheet>
5 row, 4 column
table with multiple
cells
Well-Formed XML Instance Documents Well-formed XML documents can be processed by an
XML processor.– Internet Explorer can serve as an XML processor.– XML is also a feature built into Microsoft Office (beginning with XP)
A well-formed XML document obeys all of the XML syntax rules.– There is one and only one root element.– Tags must balance – every opening tag must have a closing
tag.– XML is case sensitive – upper and lowercase characters are
different.– Opening and closing tags must be the same, except the
closing tag starts with a slash (/).
WF
NWF
XML SummaryExtensible Markup Language
HTML was designed to display data and to focus on how data looks.
XML was designed to describe data and to focus on what data is.
XML Technologies– Instance documents hold data.– Schemas define valid documents (what they look
like and what they must contain)– Stylesheets describe how to format the data.
XML is the new foundation/standard for exchanging business documents electronically.
Instance Documents
A tree hierarchy:– Parents … children … “leaf” nodes
inventory
item item item
name id color qoh
weight cost type
name id color qoh
weight cost type
name id color qoh
weight cost type
One root element: inventory Mid-level elements: individual
items Individual data content
The End
XML
Extensible Markup Language
XML: Extensible Markup Language HTML was designed to display data and to
focus on how data looks. XML was designed to describe data and to
focus on what data is.– Extensible: that which can be extended, it is flexible, and
can be added to.– XML adds meaning or context to the data that is being
transmitted. <weight>100</weight>
HTML is used to display documents with a web browser, but HTML cannot be used by other applications because it does not add any INFORMATION about the data being transmitted.
Core XML Technologies The XML Instance document
– Stores data in a hierarchical format– XML Instance documents are the heart of XML.
XML Schemas– Defines the structure of a valid XML instance document and
the types of values that elements may hold.– XML Schemas are used to validate the XML instance
documents. Someone who has your schema knows what the information that you will be sending them or exchanging with them will look like.
XSL (the extensible Stylesheet Language)– Describes how the XML data should be displayed– Used to convert an XML instance document from one format to another.
Some of the formatting can be undertaken using HTML.
Example of Instance Document Coding
Instance Documents
A tree hierarchy:– Parents … children … “leaf” nodes
inventory
item item item
name id color qoh
weight cost type
name id color qoh
weight cost type
name id color qoh
weight cost type
One root element: inventory Mid-level elements: individual
items Individual data content
Inventory Schema
A description of the rules that“valid” XMLinstance documents mustfollow.
Applicationsthat understanda schema know what to expect and can process any associated, valid documents. Schemas define the content, organization, and structure of valid instance documents.
Used to format instance
documents
The XSL Stylesheet
Instance document with stylesheet call
XML SummaryExtensible Markup Language
HTML was designed to display data and to focus on how data looks.
XML was designed to describe data and to focus on what data is.
XML Technologies– Instance documents hold data.– Schemas define valid documents (what they look
like and what they must contain)– Stylesheets describe how to format the data.
XML is the new foundation/standard for exchanging business documents electronically.
Extra Slides
How Would You Describe
A person– Last Name– First Name– Age– Gender– Hair Color– Weight– Height– Birthdate– College Major
A building at KSU– Name– Location– When Built– Architect– Primary College Using the Building
A university in the Big 12– Name– City– State– Mascot– Abbreviation– Color (primary school color)
XML in e-business If you owned an e-business, how would you
describe your inventory items?– Name – a name for an item– Description – a brief description of an item– Color– Weight– QOH (Quantity on Hand)– ID Number– Cost– Retail Price– Type
It really depends on what is important for your particular business & operations!
Language of Love for Mutual FundsXBRL (eXtensible Business Reporting Language)
• XBRL is one of the XML schemas (a specific set of rules that documents of a certain type must follow)
• If your organization is required to report data to a regulatory body, they will dictate the rules that you have to follow when doing your reporting. That is where schemas come into play.
• If data has been “tagged” using XML/XBRL, then it is very easy to pull relevant data from long reports/filings, and then be able to analyze and compare data across many different sources.– After some sort of computer program is created, with the click of a
mouse, an XML processor can retrieve tagged data from whatever data repository it is in