[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Exclude elements in transformation

Subject: RE: Exclude elements in transformation
From: Sonke Ruempler <ruempler@xxxxxxxxxxxxxxx>
Date: Thu, 16 Sep 2004 13:14:38 +0200
fop table row suppress
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?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.