- From: axdmoraes <alexmoraes@gmail.com>
- Date: Fri, 6 Jul 2007 03:33:41 -0700 (PDT)
- To: www-xsl-fo@w3.org
HI, I found in another site an answer for this. You can use attribut sets like this. Here's a direct quote from http://www.w3.org/TR/xslt.html#attribute-sets > > The following example creates a named attribute set title-style and uses it > in a template rule. > > <xsl:template match="chapter/heading"> > <fo:block quadding="start" xsl:use-attribute-sets="title-style"> > <xsl:apply-templates/> > </fo:block> > </xsl:template> > > <xsl:attribute-set name="title-style"> > <xsl:attribute name="font-size">12pt</xsl:attribute> > <xsl:attribute name="font-weight">bold</xsl:attribute> > </xsl:attribute-set> > Alexandre solmyr72 wrote: > > Hi, Newbie question, please: Does FO support 'reusable > formatting' definitions, similar to CSS "Class" ? For example, suppose I > have a document with 2 types of text: - Heading, using font size 20pt - > Content, using font size 13pt So , a naiive approach produces this page: > <fo:block font-size=<?XML:NAMESPACE PREFIX = FO />"20pt"> Some > Heading </fo:block> <fo:block font-size="13pt"> > Some content... </fo:block> <fo:block > font-size="20pt"> More Heading </fo:block> > <fo:block font-size="13pt"> More content... > </fo:block> But this is difficult to maintain (e.g if I change > my mind and want all headings to be 25pt). Is there a better way ? > Does FO support something like the 'Class' notion of CSS , so > that you declare that 'MyHeading' means 'font size of 20', > and from now on use it, something like: <fo:block > class='MyHeading'> Thanks very much !   > Ready for the edge of your seat? > Check out tonight's top picks on Yahoo! TV. > > > -- View this message in context: http://www.nabble.com/-xsl-fo--%3A-Does-FO-support-reusable-style-definition%2C-similar-to-CSS--tf4026986.html#a11461979 Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Friday, 6 July 2007 17:10:08 UTC