Q&A

Q1:When there's more than one template in the XSL file, what determines the order of execution when the apply-templates command is encountered?
A1: The order of appearance of the templates is irrelevant. The determining factor is the order in which the data is encountered when the data is read from the XML file. Since this data is read sequentially, it's the order of the data in the file.
Q2:What's one argument for not splitting the project into three files?
A2: The most compelling argument involves security. Embedding the XSL template in some file where the source is hidden could protect trade secrets.
Q3:What does the transformNode() method do?
A3: It applies the XSL template to the XML data file. The operation generates HTML code, which ...

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.