xsl-list
[Top] [All Lists]

Re: convert an attribute's value to a text node?

2002-12-02 11:22:16
Hello Gunther,

do you really need a node set or do you want to output the text value directly? I can see only one example for a needed node set:

<xsl:apply-templates select="saxon:node-set($string)"/>

But couldn't this be solved with a call-template and an appropriate processing at this template?

Regards,

Joerg

Gunther Schadow wrote:
Hi, I am in the process of converting my heavy uses of Saxon and it's
extensions to more standard XSLT 2.0 + XPath 2.0 and here is the one
problem I have left:

I need to convert a string to a text-node. More specifically, I need
to convert the value of an attribute to a text-node, because I have
special templates that expect text-nodes.

In the old days I used:

   saxon:node-set(string(@att))

which would give me back a text-node.

Note that saxon's implementation of exsl:node-set would not allow a
string argument, but saxon:node-set would, and would do exactly what
I needed.

Now Michael has removed saxon:node-set from Saxon 7 because this
RTF-madness ;-) is basically cleared now (THANKS for THAT!) But,
my little corner-use-case seems to be unhandled unless I am missing
something (which is likely.)

Thanks for any ideas!
-Gunther


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list