[xslt] xsltPrecomputerStylesheet and xml:space
- From: Keith Isdale <k_isdale tpg com au>
- To: xslt <xslt gnome org>
- Subject: [xslt] xsltPrecomputerStylesheet and xml:space
- Date: Sun, 10 Feb 2002 15:23:38 +1000
Hi all,
I've been looking at extracting comments from the stylesheet so they can be
appended to the search results in xsldbg. The the libxslt preprocessor, as
expected, strips off all comments that it can. If I attatch
xml:space="preserve"
to the top node of the stylesheet, the preprocessor partly does what I had in
mind. It turns the comments into a text node that only has a line feed
character.
I relealize that libxslt can not be run with the extra comment preserved. And
planned to disable executing the stylesheet in xsldbg whilst the comments
have been preserved.
Is there a way arround this without a change to libxslt? I understand the
comments of interest get "flagged" to be stripped at at libxslt/xslt.c : line
1139
An example of what I mean by comments are
<code>
<!-- The default stylesheet to process -->
<xsl:variable name="default" select="xsldoc.xsl"/>
<!-- Format and display file details-->
<xsl:template match="file">
<xsl:text>file:</xsl:text><xsl:value-of select="@url" />:
<xsl:text>line </xsl:text><xsl:value-of select="@line" />
<xsl:text> default</xsl:text><xsl:value-of select="$default" />
</xsl:template>
</code>
--
Keith Isdale
k_isdale@tpg.com.au | xsldbg stylesheet debugger
http://xsldbg.sourceforge.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]