Re: [xsl] Pattern "node()" and document nodes

Subject: Re: [xsl] Pattern "node()" and document nodes
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 25 Feb 2010 11:09:15 -0800
Well, I wanted to simplify things too much :)

However, the spec says this exactly:

" node() matches any node other than an attribute node, namespace
node, or document node." (the 12th bullet).

And David Carlisle provided the precise explanation why this is so.

Dimitre Novatchev
Truly great madness cannot be achieved without significant intelligence.
To invent, you need a good imagination and a pile of junk
Never fight an inanimate object
You've achieved success in your field when you don't know whether what
you're doing is work or play

On Thu, Feb 25, 2010 at 10:48 AM, Florent Georges <lists@xxxxxxxxxxxx> wrote:
> Dimitre Novatchev wrote:
>> No, because, there is no way to issue <xsl:apply-templates/>
>> that would process a document node
> B Well, without @select that's true, but:
> B  B <xsl:variable name="doc">
> B  B  B  <root/>
> B  B </xsl:variable>
> B  B <xsl:apply-templates select="$doc"/>
> B Anyway, xsl:apply-templates is not the only way to apply rules
> to a node. B Most of my transforms actually apply rules to a
> document node: the transform itself, with an source document, is
> defined as the result of applying the rule to the document node
> for this source ;-)
> B Regards,
> --
> Florent Georges

Current Thread