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

Re: Re: Re: EXSL's dyn:evaluate() and XALAN vs. xsl:us

Subject: Re: Re: Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-attribute-sets
From: raphead@xxxxxxx
Date: Sun, 24 Aug 2003 14:27:17 +0200 (MEST)
xsl use attribute sets switch
> > >A simple example: Why not include an top-level element belonging to a
> > > non-xsl
> > >namespace and having the necessary attributes. Then you can just copy
> them.
> > >
> >
> > I thought about that but I don't think that this is an solution. Right!
> I
> > could dynamically
> > decide depending on a parameter to do something - in case of copy: copy
> some
> > xml to the
> > current position. But this won't fix my problem as I'm working with fo
> and
> I
> > need exactly
> > the behaviour of the use-attribute-sets parameter which creates
> attributes
> > from a XML-fragment.
> >
> > Now I thought about using call-template but it has the same limitation:
> The
> > name must be
> > qname :-/
> Then you'll gradually find that the same effect can be achieved with
> xsl:apply-templates
> For details see:
> I really doubt that in this concrete case you really need so much power,
> as
> I have not seen your source xml document and do not know what the
> transformation must do.

I think I with Michaels and your hints, I got it!

on every occurence of the relevant attribute, I'm caling a Template with the
value of the attribute. The called template decides with a switch-case like
what attributes to create:

The called template looks like that.

    <xsl:template name="definitions">
		<xsl:param name="selector"/>
	    <xsl:choose >
                    <xsl:when test="$selector='test1'">
				    <xsl:attribute name="font-family">sans-serif</xsl:attribute>
				    <xsl:attribute name="font-weight">bold</xsl:attribute>
                    <xsl:when test="$selector='spacer1#">
				    <xsl:attribute name="font-family">sans-serif</xsl:attribute>
				    <xsl:attribute name="font-weight">bold</xsl:attribute>

Thanks for your help!

> =====
> Cheers,
> Dimitre Novatchev.
> http://fxsl.sourceforge.net/ -- the home of FXSL

COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post

 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.