Components of XML
- DTD
A DTD describes the structure of your XML document, by defining the
acceptable XML tags for your application and their relationships. By including a DTD with your XML document, you can ensure that any application which processes your data knows the purpose and structure of the tags you have created. In addition, DTDs can be external, allowing many XML documents to link to them and share a predefined structure.
example of a DTD
- XML Document
XML has the role of middleman between HTML and traditional databases,
providing logical data to Web applications for dynamic conversion into HTML. In conjunction with the associated technologies of XSL, CSS, and DHTML, XML provides the link to a Web page's data, and the logical description which allows it to be displayed optimally.
example 1
example 2
- XSL Stylesheet or XSLT Document
XML data, before it can be displayed in an application, should be
formatted for display. With CSS, you can specify display rules for your tags. With XSL, you can go one step further, and build HTML structures such as tables or lists to display your data. In addition, as with DTDs, you can specify XSL and CSS documents for many XML datasheets, ensuring that your data will be displayed consistently.
stylesheet used in example above
The purpose of stylesheets is to be able to display the data in
the XML document in a browser. To demonstrate this, we will apply a
different stylesheet to the same XML document seen in example 1 and
example 2:
example
1 with a different stylesheet applied to it
example 2 with a
different stylesheet applied to it
Home | Introduction | Components | XML Editors | Applications
|