[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: xsl/xhtml: passing through comments
I want to pass through comments from DocBook/XML to XHTML: ------------------------------------------------------------------ <arg><option><link linkend="opt-libdir">-B &lld;</link></option></arg> <!-- #ifdef UNIX --> <arg><option><link linkend="opt-link-set">-K <replaceable>linking-set</replaceable></link></option></arg> <!-- #endif --> ------------------------------------------------------------------ ===> ------------------------------------------------------------------ [<code class="option"><a href="#opt-libdir">-B <em class="replaceable"><code>lisp-lib-dir</code></em></a></code>] <!--#ifdef UNIX--> [<code class="option"><a href="#opt-link-set">-K <em class="replaceable"><code>linking-set</code></em></a></code>] <!--#endif--> ------------------------------------------------------------------ I have this: ------------------------------------------------------------------ <xsl:template match="comment()"> <!-- pass through comments --> <xsl:text> </xsl:text> <xsl:comment><xsl:value-of select="normalize-space(.)"/></xsl:comment> <xsl:if test="not(following-sibling::comment())"> <xsl:text> </xsl:text></xsl:if> </xsl:template> ------------------------------------------------------------------ for some reason, the last "xsl:if" does not work: I do not get the newline after <!--#ifdef UNIX-->, I get a space instead: ------------------------------------------------------------------ <!--#ifdef UNIX--> [<code class="option"><a href="#opt-link-set">-K <em class="replaceable"><code>linking-set</code></em></a></code>] ------------------------------------------------------------------ why? -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.iris.org.il> <http://www.dhimmi.com/> <http://ffii.org/> <http://pmw.org.il/> <http://www.camera.org> <http://www.jihadwatch.org/> The world is coming to an end. Please log off.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]