[xsl] Ouput escaping / XPath

Subject: [xsl] Ouput escaping / XPath
From: Manuel Baehnisch <s716631@xxxxxxxxxxxxx>
Date: Tue, 15 Nov 2005 18:49:13 +0100
Hi everyone,

I'm having a problem with the <xsl:message> element. The error message
I want to output lists the element of the source-tree where the error
occured. I tried to output the text with:

<xsl:message>
  <xsl:text disable-output-escaping="yes>Error at &lt;Elementname&gt;</text>
</xsl:message>

If also tried to see what result I get by just using the <xsl:text>
element. Either way, I can't get it to print '<Elementname>' either to
the commandline or into the result-tree. Is it possible at all?



My other issue with XPath: I have a source like this:

<Text> some <b>foo <!-- replace this --></b> words </Text>

Once I reach the <Text> element I copy to the result-tree
using:

<xsl:copy-of select="./child::node()"/>

This obviously copies everything, even the comment. Apparently I would
like to copy everything except the comment as to get the result:

some <b>foo </b> words

I've been experimenting with "./child::element() | ./child::text()" as
well as "./child::node() except ./descendant::comment()" and a couple
other combinations. The element() function seems to copy the comment
as well. What am I doing wrong here?

Your help is much appreciated.
Manuel Baehnisch

Current Thread