[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] copy attributes modifying their values, regardless of their names


Subject: Re: [xsl] copy attributes modifying their values, regardless of their names
From: TW <zupftom@xxxxxxxxxxxxxx>
Date: Sun, 5 Dec 2010 14:47:28 +0100

2010/12/4 Michael Kay <mike@xxxxxxxxxxxx>:
> Well, firstly, "attribute value templates" are things you find in a
> stylesheet, not in a source document. But let's assume you mean "attribute
> values containing "{".
>

O.K., that may be more accurate terminology, but my source document
contains mostly elements from the XSLT namespace. The XPath
expressions in the source documents can contain variables where the
usual leading '$' is replaced by '^', so they aren't working XSLT.
Based on those circumflexes, another stylesheet (among other things)
adds boilerplate code and turns the source into working XSLT.

Is it acceptable style to leave the XSLT elements from the source
documents in the XSL namespace, or would it be advisable to put them
into a different namespace as they contain "broken" XPath expressions?

> <xsl:apply-templates select="@* | node()"/>

Ah, that's why my templates for the attributes wouldn't be called into
action.  I have to select them explicitly when applying templates!
Thanks for that!  There's still a lot to learn about XSLT for me, I'm
sure.

Thomas W.


Current Thread
Keywords