Mario,
At 11:22 AM 2/3/2010, you wrote:
I'm working in FO and would like to do the following:
<fo:block xsl:use-attribute-sets="as_SectionTOCTitleLvl{parent::*/@level}">
...
</fo:block>
Error gets thrown up. Did a quick google search and seems that
use-attribute-sets value cannot be dynamic.
No, but there are other ways to skin the same cat.
For example, you could have templates in a mode matching your @level
attributes, distinguished by value, which add whichever attributes
are peculiar to that particular level. Then just apply templates to
parent::*/@level in that mode. (And use an attribute set for the
attributes common to all levels.)
So:
<xsl:template mode="TOCTitleLvl" match="@level[.='1']">
<xsl:attribute name="font-size">125%</xsl:attribute>
</xsl:template>
<xsl:template mode="TOCTitleLvl" match="@level[.='2']">
<xsl:attribute name="font-size">115%</xsl:attribute>
<xsl:attribute name="font-style">italic</xsl:attribute>
</xsl:template>
... etc ...
then
<fo:block xsl:use-attribute-sets="as_SectionTOCTitle">
<xsl:apply-templates mode="TOCTitleLvl" select="../@level"/>
...
</fo:block>
So my question is, are there plans to allow this in a future XSLT
recommendation?
Dunno. But from what I've seen, named attribute sets are rarely used
outside the context of FO, so this requirement might not have gotten
much attention.
Cheers,
Wendell
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--