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

Re: xsl:use-attribute-sets, xslt 1.0, fo output

Subject: Re: xsl:use-attribute-sets, xslt 1.0, fo output
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Wed, 19 Jan 2011 16:57:43 +0000
Re:  xsl:use-attribute-sets
On Wed, 19 Jan 2011 13:41:34 +0000
David Carlisle <davidc@xxxxxxxxx> wrote:

> On 19/01/2011 13:25, Dave Pawson wrote:
> > My objective was to keep all attribute sets
> 
> I've used xslt a bit from time to time, but I've never used attribute 
> sets, they are more or less just a simple restricted cut down form of 
> named template with a different calling convention, and if they are
> too simple for your use case the easiest thing usually is to forget
> they exist. So typically use a named template or variable, but in
> your case since you want a dynamic dispatch use apply-templates.
> 
> <xsl:template match="@remap[.='LINE']">
>    <xsl:attribute name="margin" select="3"/>
>    <xsl:attribute name="color" select="#aabbcc"/>
> </xsl:template>
> ...
> 
> <xsl:template match="speaker">
>      <fo:block">
>        <xsl:apply-templates select="@*|node()/>
>      </fo:block>
> </xsl:template>
> 
> David

"Not often he's wrong, but he's right again"
Thanks David, works well for this use-case.

Basically attribute selection for fo, where for html I'd
have been using CSS styling.


-- 

regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

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.