|
Subject: Re: [xsl] text indent problem From: "Oliver Müller" <oemueller@xxxxxxxxx> Date: Thu, 11 Jan 2007 11:39:48 +0100 |
Hi, actually the stylesheet is not working anymore. I just put the new "use" attribute into the key-node, but in result there are only empty blocks generated. Any ideas ?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key name="a" match="node()" use="generate-id((preceding-sibling::absatz[1]|preceding-sibling::*[last()])[1])" />
<xsl:template match="sec">
========= section <xsl:number/> ===
<xsl:for-each select="node()[1]|absatz">
<xsl:text> </xsl:text>
<block>
<xsl:if test="self::absatz">
<xsl:attribute name="indent">2em</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="key('a',generate-id())"/>
</block>
</xsl:for-each>
</xsl:template><xsl:template match="b"> <bold><xsl:apply-templates/></bold> </xsl:template>
<xsl:template match="i"> <italic><xsl:apply-templates/></italic> </xsl:template>
<sec> Some text, no indent, first paragraph, <b>bold text</b> and <i>italicized</i> text <absatz /> <i>some</i> other text, with indent <absatz /> <b>yet</b> other text with <b>bold text</b> and <i>italicized</i> text and <b><i>bold italic</i></b> text <absatz /> again other text </sec>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] text indent problem, Barbara Lackenbauer | Thread | Re: [xsl] text indent problem, David Carlisle |
| Re: [xsl] most efficient flat file , James Fuller | Date | Re: [xsl] Problem retaining HTML ta, Abel Braaksma |
| Month |