Subject: RE: Exclude elements in transformation
From: Sonke Ruempler <ruempler@xxxxxxxxxxxxxxx>
Date: Thu, 16 Sep 2004 13:14:38 +0200
|
Sonke Ruempler <mailto:ruempler@xxxxxxxxxxxxxxx> wrote on Thursday,
September 16, 2004 11:58 AM:
> Andrew Welch <mailto:ajwelch@xxxxxxxxxxxxxxx> wrote on
> Thursday, September
> 16, 2004 11:41 AM:
>
>> This will do what you ask:
>>
>> <xsl:template match="*[preceding-sibling::A]"/>
>>
>> But I suspect there might be a better solution - I think it's
>> preferable to not select the nodes to process in the first place,
>> rather than select everything and use a no-op template to suppress
>> the things you don't want. You would need to give a little more
>> information for that kind of answer.
>
> Thx for your quick answer.
>
> Check the thread 'XSLT and FO/FOP workarounding' for details
> of my problem -
> maybe you know a better solution ;-)
My templates for now are:
[XSLT]
<xsl:template match="h1|h2|h3|h4|h5">
<fo:table table-layout="fixed" width="100%">
<fo:table-column
column-width="proportional-column-width(1)"/>
<fo:table-body>
<fo:table-row keep-with-next="always">
<fo:table-cell>
<fo:block
xsl:use-attribute-sets="name()">
<xsl:apply-templates/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
<xsl:apply-templates
select="following-sibling::*"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="*[preceding-sibling::(h1|h2|h3|h4|h5)]"/>
[/XSLT]
But that does not work
1. The second element is there twice.
2. The xsl:use-attribute-sets="name()" does not work here.
Any idea?
|