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

Re: Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-at

Subject: Re: Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-attribute-sets
From: raphead@xxxxxxx
Date: Fri, 22 Aug 2003 08:10:20 +0200 (MEST)
raphead
Hi,

> According to the XSLT 1.0 spec "The value of the use-attribute-sets
> attribute is a whitespace-separated list of names of attribute sets. Each
> name is specified as a QName ..."
> 
> A QName cannot be calculated dynamically -- it must be known at compile
> time.

I'm aware of that but my understanding of the dyn:evaluate extension is,
that is let's
say 'on level above the xslt processing'. While reading the spec on
exslt.org
the following sentence confirmed this somehow:

...The string is always evaluated exactly as if it had been literally
included in place of the call to the dyn:evaluate function.

And if you're right, how can one determine for which params etc.
dyn:evaluate will work?

> 
> 
> Therefore, what you're trying to achieve is impossible in this way.
> 

Do you have an ide, how to achive it? I also tried with chained templates
and parameters but
then I really stuck with the problem with qnames.

Thomas
> 
> =====
> Cheers,
> 
> Dimitre Novatchev.
> http://fxsl.sourceforge.net/ -- the home of FXSL
> 
> 
> <raphead@xxxxxxx> wrote in message news:29467.1061417799@xxxxxxxxxxxxxxxx
> Hi,
> 
> As I don't really like mailinglists it was kind of hard for me do this
> step
> but for my current problem
> I can't find a proper answer elsewhere:
> 
> Suppose I have the following XML document:
> 
> ...
> <elemxy class="test1">Some content</elemxy>
> ...
> 
> And the following template snippet:
> 
> ...
>   <xsl:template match="elemxy">
>     <fo:block  xsl:use-attribute-sets="dyn:evaluate(@class)">
>     <xsl:apply-templates/>
>     </fo:block>
>   </xsl:template>
> ...
> 
> Obviously I have several different class attributes (like test1 here) and
> want
> them to be the name of an attribute-set. This because: I'm generating the
> attribute-sets dynamically
> and attach them to the xsl stylesheet.
> 
> My question is now: Why is the above construct NOT working?
> I'm using xalan-j_2_5_1 and my root element of the stylesheet looks like
> this:
> 
> <xsl:stylesheet version="1.0"
>                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
>                 xmlns:xalan="http://xml.apache.org/xalan"
>                 xmlns:dyn="http://exslt.org/dynamic"
>                 extension-element-prefixes="dyn">
> 
> Xalan simply ignores the statement. When I replace the expression with
> a static name the proper attribute-set is used.
> 
> Thomas H.
> With greets from Germany
> 
> 
> -- 
> 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
> 
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

-- 
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

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