Creating XSLT Style Sheets

XSLT transformations accept a document tree as input and produce a tree as output. From the XSLT point of view, documents are trees built of nodes, and there are seven types of nodes XSLT recognizes; here are those nodes, and how XSLT processors treat them:

NodeDescription
Document rootIs the very start of the document
AttributeHolds the value of an attribute after entity references have been expanded and surrounding whitespace has been trimmed
CommentHolds the text of a comment, not including <!-- and -->
ElementConsists of all character data in the element, which includes character data in any of the children of the element
NamespaceHolds the namespace's URI
Processing instructionHolds the text of the processing instruction, ...

Get Inside XML 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.