Q&A

Q1:Are there restrictions on where the xsl:comment element can appear in the XSL file that's generating the HTML code?
A1: An HTML comment can be placed anywhere in an HTML file where the code is HTML. However, it cannot be placed inside SCRIPT code. Therefore, it can appear anywhere in the HTML code, but not necessarily everywhere in the HTML file.
Q2:What's the precise result of the selectNodes() method?
A2: Like all database queries, the result is a subset of the nodes in the XML file. It's possible for that set to be empty (although this was never demonstrated in any of the examples). However, the method doesn't return a pointer to the first element of the set. That operation must be done explicitly.
Q3:As a programmer, I've used other ...

Get Sams Teach Yourself XML in 24 Hours 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.