HyperWord Services

 

Home

Resources

Services

Contact Info

About Hyper/Word

XML Quick-Reference Guide

Basic Elements of XML

An XML project has three basic categories of files:

  • Content - In XML files. Comparable to the HTML files that form a web site.

  • Syntax - In DTD or schema file(s). The syntax rules that XML files must adhere to in order to be valid. DTDs are widely used and come from SGML. Schemas are more powerful but just starting to come into use for XML-based content.

  • Rendering - In CSS or XSL files. The display rules that determine how XML files will look in a browser. CSSs are common and come from the web. XSL is more powerful but more complex.

How these categories of files tie together:

  • XML files contain the syntax rules, or call DTD or schema files that contain the syntax rules.

  • XML files call CSS or XSL files that control how the XML files display in the browser, or call XSLT files that control the conversion of the XML files to other formats.

XML Syntax Standards

XML files must meet one of two standards. If an XML processor, such as a browser, knows that an XML file adheres to a certain standard, the processor does not have to spend time on ambiguous or bad code. This allows small, fast processors. The two syntax standards are:

"Well-formed" - XML files adhere to a basic, common set of syntax rules, including:

  • Root element contains all other elements.

  • Elements are properly nested.
    <B><I></I></B> not <B><I></B></I>

  • All elements have start and end tags.
    <B>word</B> not <B>word

  • Matching case in start and end tags.
    <B>word</B> not <B>word</b>

  • Attribute values in single or double quotes.
    <img src="graphic.gif"> or src='graphic.gif' not <img src=graphic.gif>

  • "Empty" elements (<img>, <p>, or <br>) use end tag <br></br> or closed start tag <br/>.

  • Full list of requirements at www.w3.org.

Valid - XML files are well-formed and adhere to the syntax rules defined in a DTD or schema.

A Basic Setup for XML Work

  • Browser - IE5.X or IE6

  • XML parser – Go to www.google.com, search for, and download "MSXML Parser 3.0 SP4"

    Go to your download folder and double-click msxml3sp4Setup.exe to install it.

  • A validation tool - Go to www.google.com, search for, and download "Internet Explorer Tools for Validating XML and Viewing XSLT Output"

    Go to your download folder and double-click iexmltls.exe to install it.

    Right-click on msxmlval.inf in the install folder and select Install from the popup menu. Repeat for msxmlvw.inf.

  • An editor - Download HTML-Kit from www.chami.com/html-kit/#download

    Go to your download folder and double-click HKSetup.exe to install.

NOTE: Netscape 6 supports XML but does not yet support XSL.

NOTE: The URLs above are accurate as of May 2, 2007.

Some XML Acronyms

  • CSS - Cascading Style Sheets. Contain formatting instructions.

  • DSSSL - Document Style Semantics and Specifications Language. SGML formatting language based on LISP.

  • DTD - Document Type Definition. Contains syntax rules.

  • SGML - Standard Generalized Markup Language. First successful markup language, source of HTML and XML.

  • XHTML - Extensible Hypertext Markup Language. A recasting of HTML as a language under XML.

  • XML - Extensible Markup Language.

  • XSL - Extensible Style Language. XML style language derived from DSSSL.

  • XSLFO - Extensible Style Language Formatting Objects. Output format instructions for things like margin settings and text enhancement.

  • XSLT - Extensible Style Language Transforms. Instructions for converting material in an XML file to other formats.

 
. .... ©2002-2007 HyperWord Services All Rights Reserved
     
   

Neil Perlin
Hyper/Word Services
101 Emily Road
Tewksbury, MA 01876

nperlin@concentric.net

Phone: 978-657-5464