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

dynamic usage of attribute sets

Subject: dynamic usage of attribute sets
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Mon, 21 Oct 2002 15:30:18 +0200
xsl attribute usage

this time I have a question regarding attribute sets. I create a table in XSL FO and have one template for creating the cells:

<xsl:template match="iupb:cell">
<fo:table-cell xsl:use-attribute-sets="table-cell">
<fo:block wrap-option="no-wrap">
<xsl:variable name="value" select="iupb:value0|@iupb:value0|@iupb:value1"/>
<xsl:when test="$value = 'nd'"></xsl:when>
<xsl:when test="@iupb:type = 'AMOUNT'">
<xsl:value-of select="format-number($value div 100000, '#.##0')"/>
<xsl:when test="not(@iupb:type) or @iupb:type = 'LABEL'">
<xsl:value-of select="$value"/>
<xsl:value-of select="format-number($value, '#.##0')"/>

Now I want to use a different attribute set for header cells. According to the spec http://www.w3.org/TR/xslt#attribute-sets only QNames are allowed as value for use-attribute-sets, but not expressions. So I must assume, that it is not possible in general. But has somebody a workaround. Until now I must add the special attributes via <xsl:attribute>:

  <fo:table-cell xsl:use-attribute-sets="table-cell">
    <xsl:if test="parent::iupb:header-cell">
      <xsl:attribute name="font-weight">bold</xsl:attribute>
      <xsl:attribute name="text-align">center</xsl:attribute>

For a third type (column headers vs. row headers) I had to add still more <xsl:attribute/>s. Does anybody know a smarter way to achieve "dynamic attribute-sets"?




System Development
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409

VIRBUS hat jetzt als erster deutscher Softwarehersteller die Zertifizierung für den 3D Secure-Authentifizierungsstandard "Verified by Visa" erhalten. Details unter http://www.virbus.de/de/press/pressemitteilung/20020828_verified_by_VISA.

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.