[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-attribute-sets


Subject: Re: [xsl] Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-attribute-sets
From: raphead@xxxxxxx
Date: Sat, 23 Aug 2003 19:50:30 +0200 (MEST)

Hi Dimitre and thanks so far,

>>>  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'. 
>
>No, extension functions are invoked at run time. They are not part of a
>pre-processor.
>
>> 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.
>
>This does not say at all that dyn:evaluate is invoked prior to the XSLT
>transformation -- what made you think so?
>

First of all I thought that because what I read in
http://www.w3.org/TR/xslt#qname
A qname can be passed as parameter which is wrong.
Then I read about evaluate and after I read the spec of dyn:evaluate() 
It sounded like the solution for this problem... well I thought this problem
must have many people and therefore they intended dyn:xxx.
Now I have to admit, that there is no hint that all that happens at
pre-compilation time.


>
>> 
>> And if you're right, how can one determine for which params etc.
>> dyn:evaluate will work?
>
>dyn:evaluate() works in your case. The problem is that a QName cannot be
substituted
>by something (the result of dyn:evaluate()) returned dynamically at run
time.
>
>>>  
>>>  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.
>
>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 :-/

Thomas

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