Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output
2011-01-19 07:19:07
Well, you don't have to read an external file of attribute sets, you
can just use document('') to read the stylesheet fragment itself and
find its attribute sets.
But I was suggesting abandoning the attribute sets and simply
rewriting them as called templates.
Yes, the nested references will be awkward, but only because you
state you are using XSLT 1 thus requiring the typical recursive
call. Much easier in XSLT 2.
I hope this helps.
. . . . . . . . . . . . Ken
At 2011-01-19 13:01 +0000, you wrote:
On Wed, 19 Jan 2011 07:48:11 -0500
"G. Ken Holman" <gkholman(_at_)CraneSoftwrights(_dot_)com> wrote:
> 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.
I think so Ken.
How about a named template, param the @remap value,
read the external file of attribute sets, then copy over
the attributes explicitly and generates the output element
with all the attributes...
Long winded, but keeps the world tidy.
Bit messy with nested xsl:use-attribute-sets :-)
Thanks
--
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>
--~--
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, G. Ken Holman
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output,
G. Ken Holman <=
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, David Carlisle
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson
- Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, David Carlisle
|
Previous by Date: |
Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson |
Next by Date: |
Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson |
Previous by Thread: |
Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson |
Next by Thread: |
Re: [xsl] xsl:use-attribute-sets, xslt 1.0, fo output, Dave Pawson |
Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|