Subject: Re: [xsl] alphabetic counters From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 10 May 2004 14:42:17 -0400 |
But I still have some CDATA and escaping going on. This occurs when creating table rows:
<tr>...
<xsl:if test="position() != 1"> <xsl:text disable-output-escaping="yes"><![CDATA[<tr class="]]></xsl:text> <xsl:copy-of select="$planetbg"/> <xsl:text disable-output-escaping="yes"><![CDATA[">]]></xsl:text> </xsl:if>
...
<xsl:if test="position() != last()"> <xsl:text disable-output-escaping="yes"><![CDATA[</tr>]]></xsl:text> </xsl:if>
...</tr>
It's designed to create new rows like this:
<tr> <th rowspan="3">...</th> <td>some data</td> </tr> <tr> <td>more data</td> </tr> <tr> <td>row 3 of the header</td> </td>
But outputting nodes within an xml:if and closing them within another causes parse errors in Libxslt and Sablotron.
<xsl:attribute name="href">
<xsl:value-of select="concat('#',@cite)" />
<xsl:number count="/catalogue/citation[@author=id(@cite)/@author and @year=id(@cite)/@year]" format="a"/>
</xsl:attribute>
<xsl:number> doesn't work for me. I tried putting it in a variable and outputting the variable as a test and nothing was produced.
nor was anything output by David's
<xsl:number format="a" count="reference[@author=current()/@author][@year=current()/@year]"/>
or by changing " and " to "][" in Andreas' version.
The key approach from Michael Key didn't seem to work from just copying and pasting, but I will read the docs on keys and see if i can fix it.
I'm using Libxslt and Sablotron - Saxon and Xalan-J cannot parse the xsl file properly, so I am not bothering with them. I don't know what versions I have, whichever ones are bundled with Marc Liyanage's TestXSLT 3.0 software (http://www.entropy.ch/software/macosx/)
Good luck, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] alphabetic counters, Nicholas Shanks | Thread | RE: [xsl] alphabetic counters, Andreas L. Delmelle |
RE: [xsl] using document in xsl:key, M. David Peterson | Date | Re: [xsl] using document in xsl:key, Wendell Piez |
Month |