XML Tips from perfectxml.com [Page 2]
- What is DTD?
The Document Type Definition (or data type definition) (DTD) defines the valid syntax of a class of XML documents. That is, it lists a number of element names, which elements can appear in combination with other ones, what attributes are available for each element type, etc. A DTD uses a different syntax from that used by XML documents.
- How are Namespaces useful?
Namespace allow developers to qualify element names and relationships. Namespaces make element names uniquely recongnizable to avoid name collisions for elements that have the same name but are defined in different vocabularies. They allow tags from multiple namespaces to be mixed, which is essential if data is coming from multiple sources.
A DOM for XML is an object model that exposes the contents of an XML document. The W3C's Document Object Model (DOM) Level 1 Specification currently defines what a DOM should expose as properties, methods, and events. Microsoft's implementation of the DOM fully supports the W3C standard and has additional features that make it easier for you to work with XML files from your programs.
- Omnimark http://www.omnimark.com
The Omnimark Language, is a rule based transformation language that can be used for XML-to-HTML transformation. People who are more used to procedural languages than to declarative language, Omnimark is the choice, and it's free too!
- Few words about XLink
XLink provides a flexible mechanism for defining links in XML documents that connect various resources together. XLink may be used to link one document to another, or it may be used to link many different resources together, these resources may even be resources that don't normally have the ability to contain links, like image files.
- Few words about XPointer
XPointer is useful when you do not want to point to an entire XML document, but just to some portion of it. XPointer essentially extends XPath and can be used to point/link to portion of XML document.
- Detecting & Handling XSL Errors
An XSL stylesheet can generate two types of errors: parse errors and run-time errors.
Before applying XSL stylesheet to XML document (using transformNode), the parseError object should first be checked to see whether there was a parsing error in the XML file or in the style sheet. Then, run time errors can be suppressed and handled consistently with parsing errors, using try...catch block.