RE: Conditionally use attribute sets?
Hi, >I'm not sure I understand (in fact, I'm fairly sure I don't >understand) If you really need an apply-import's like >behaviour you can use a matching one in a special mode >(matching a more or less arbitrary node, such as /) Yes, but in most cases I don't want to match a node in some mode, but rather just say "add figure title formatting properties into this FO" and attribute sets suit that need perfectly. If an importing stylesheet wants to override only e.g. font weight, they don't have to redeclare the other attributes. Naturally I could have <xsl:template match="figure/title"> <fo:block> <xsl:apply-templates select="." mode="formatting-properties"/> <xsl:apply-templates/> </> </> <xsl:template match="figure/title" mode="formatting-properties"> <xsl:attribute name="font-size">10pt</> </> And the importing stylesheet could then just declare <xsl:template match="figure/title" mode="formatting-properties"> <xsl:apply-imports/> <xsl:attribute name="font-size">10pt</> </> But thus far attribute sets have done the job even with the limitation of not being able to use them conditionally. Jarno
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format