Subject: Re: [xsl] Can a single XPath statement duplicate the functionality of this verbose <xsl:choose> statement?|
From: "Mark" <mark@xxxxxxxxxxxx>
Date: Mon, 24 Oct 2011 18:00:16 -0700
Hi Michael, Well that helps - I thought it was just me that was muddled ;-) Thanks, Mark
I still do not understand, for instance, the emphasis in the literature in distinguishing between the "root" and "the document node"; it seems not to have any impact on writing code. On the other hand, learning about result tree serialization will alter my code (I hope). Makes me wonder which other primitive XSLT notions would be as useful...
There's a node D representing the document, and a node E representing the outermost element.
E is sometimes called the document element, sometimes the root element. (I call it the outermost element!)
(b) any node (document nodes, element nodes, even text nodes) can be parentless, and thus be the root of a tree
although neither of these conditions will arise in a tree that results from parsing well-formed XML.
Michael Kay Saxonica