# Presentation: 192954

## XML eXtensible Markup Language        An Introduction

**Marion A. Royal**
**GSA  **
**Office of Governmentwide Policy**

## Preface

***“******Before adopting XML, one must first decide which problem you are trying to solve.  ******Next, you must make sure that you understand the architecture to determine the appropriate place to use XML.  ******If you are not moving data between systems, don’t force feed XML just for the sake of it.”  ******	******	******Ken Wheeler*****  *****DISA DII COE***

## A Little History

**HTML has opened a channel for online information exchange.****	*****Unfortunately, it has become a ******	******	******limiting factor for us.***
**XML is not really the new kid on the block.****	*****It is a subset of SGML, which has been in use for a decade or so.***

## Limitations of HTML

**Limited number of tags.**
**Browsers are forgiving. **
**Browser developers may be tempted to add new tags that only work with their product.**
**Can’t customize layout from the clients side.**
**Product comparison **

## Origin of XML

**World Wide Web Consortium (W3C)****	****XML Working Group**
**Work begun in 1996 **
**Version 1.0 Recommendation released on 10 Feb 98**
**Second Edition on 6 Oct 00****http://www.w3.org/TR **

## Advantages of XML

**Data Reusability****Single Source - Multiple output****	**
**Targeted Retrieval****Documents authored by, not about**
**Flexibility**
**Accessibility**
**Portability**

## XML and HTML

**HTML tells how data should look, but XML tells you what it means.**
**XML applies context to the data and separates data content from data presentation.**
**XML provides a hierarchical structure.**
**However, XML is not designed to replace HTML.**

## Slide 8

## XML and EDI

- Not a replacement for EDI
- Small and Medium sized Enterprises may deploy XML before looking to EDI
- XML developers are using the lessons learned from EDI

## US - Emerging Trends Compared

**USA = 2 x Rest of World**

## Design Goals for 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.***

## Structuring Data

**Comma delimited****Marion,A.,Royal,GSA,202.208.4643**
**Semi-Structured**
**fname/Marion/initial/A./lname/Royal/agency/GSA/phone/202.208.4643**

## Sample XML Fragment

- <NAME>	<FIRST>**Marion**</FIRST>	<MIDDLE>**A**.</MIDDLE>	<LAST>**Royal**</LAST></NAME><AGENCY>**GSA**</AGENCY><PHONE>	<AREA_CODE>**202**</AREA_CODE>	<PREFIX>**208**</PREFIX>	<NUMBER>**4643**</NUMBER></PHONE>

## Other XML Technologies:Validation

- DTD: Document Type Definition
- Defines the permissible tagging structure for a document
- Borrowed from SGML
- example
- XML Schemas
- Will ultimately replace DTDs, more flexible
- Developed specifically to validate XML
- example

## Document Type Definitions

**Defined by its elements**
**A DTD is a series of definitions for element types, attributes, entities and notations.**
**Set of rules which may be very stringent or flexible**
**XML Documents do not require DTDs**
**DTD’s may be part of the document or may be externally referenced.**

## DTD Example

- <!ELEMENT NAME (FIRST,MIDDLE,LAST)><!ELEMENT FIRST (#PCDATA)><!ELEMENT MIDDLE (#PCDATA)><!ELEMENT LAST (#PCDATA)><!ELEMENT AGENCY (#PCDATA)><!ELEMENT PHONE (AREA_CODE,PREFIX,NUMBER)><!ELEMENT AREA_CODE(#PCDATA)>
- <!ELEMENT PREFIX(#PCDATA)>
- <!ELEMENT NUMBER(#PCDATA)>

## W3C XML Schema

_**Part 1 : Structures**_**Describe the relationships and semantics of the data.**** **
_**Part 2 : Datatypes**_**Define the primitive and generated datatypes.**

## Other XML Technologies:Display

- CSS - Cascading Style Sheets
- Pro: Easily define display properties of an XML element
- Con: Not very powerful
- Web browser only
- example
- XSL – Extensible Stylesheet Language
- Pro: can transform XML into any other markup language. (powerful)
- Con: more complicated to use
- example

## Cascading Style Sheets

- name		{display: block;
- 			font-family: Arial;
- 			font-size: 14pt;
- 			margin-top: 20px;}
- phone		{color: #cc0000;
- 			font-style: italic;
- 			font-size: 16pt;
- 			position: relative;
- 			left: 10px;}

## XSLExtensible Stylesheet Language 

**Controls presentation of data**
**Can enable multiple types of devices to view your content**
**Can convert between different XML formats (useful in data interchange)**
** *****“******Learning Stylesheets is like finding the square root of pi with Roman Numerals”  Walker White - Oracle***

## XML and HTML

**Data in XML**

**Layout in HTML**

**StyleSheets**

## XSL Transformations

- XSL Transformation

- XML

- WML

- HTML

- SGML

- PDF

- Plain Text

- XML

## XML Deployment

- System to System
- Application to Application
- Client to Server

## Technology Leaders Driving XML

**Content**
**Management**

**Application**
**Integration**

**e-Commerce**

**Native XML**
**Applications**

**e-Commerce**

**Native XML**
**Applications**

**Content**
**Management**

**Application**
**Integration**

## Sounds Good, Right?

- Not so fast, My Friend

## The Tower of Babel

## ebXML Development

- IT Supply Chain

- Core Technology Standards

- ASC X.12 EDI

## Federal CIO XML WG

- Chartered in June 2000
- Enterprise & Emerging IT Interoperability Committee (EIEITC)
- XML.GOV
- Mail List

## Data is only valuable...

*...**when it can be transformed into useful information and then into knowledge.*
*-Bryan Caporlette - Sequoia Software*

## References

**Http:XML.GOV**
**http://www.w3.org**
**http://www.xml.com**
**http://www.ibm.com/developer/xml/**
**http://biztalk.com/**
**http://www.oasis-open.org/****	****	****	****marion.royal@gsa.gov****	****	****	****202.208.4643**