At 2011-01-19 12:41 +0000, Dave Pawson wrote:
Given an input
<line remap="LINE">Of government the properties to unfold,</line>
I want to take the the remap att value and use it as a named attribute
set.
Seems
<xsl:template match="speaker">
<fo:block xsl:use-attribute-sets="{@remap}">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
is a no no, no AVT here.
Correct.
Can anyone think of a way of using them... or is the processing
wrong? Do I need an intermediate step first?
The xsl:attribute instructions in an attribute set work just as well
in a called template (though they are executed in real time with the
current node being what it is rather than the current node being the root).
Perhaps you could despatch to the appropriately named called template
by creating a despatch called template that knows the name of each of
the attribute set called templates (since calling a template also
cannot be done through an AVT).
A bit awkward, but you don't lose the concept of an attribute set,
per se, you are just creating a dynamically callable version of one
rather than a pre-defined one.
I hope this helps.
. . . . . . . . . Ken
--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
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>
--~--