Asking the Right Questions

The first question you should ask yourself is the equivalent of “Is it plugged in?” In our case, you should ask the following basic questions:

  • Is the source document well formed?

  • Can the document be validated against a DTD or XML schema?

  • Is the style sheet loading properly?

The first question sounds like a no-brainer. If you’ve authored the document by hand, surely the last step is to run the document through a parser to ensure it is well formed. However, documents are often created or modified at runtime by an application. If you are relying on an application to generate XML data, and you’ve successfully tested your style sheet against a sample document, this is the first place to look for problems. For a dynamically ...

Get Special Edition Using XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.