On 03.05.2004 16:45, Christopher Painter-Wakefield wrote:

I read a little further on the bug reports, but I didn't understand
everything.  Does this only happen when using a custom URI such as
"cocoon:/...."?

No, this happens with all URIs.


I'm wondering how difficult it would be to patch this in Xalan.  Knowing
nothing about it, of course, it is easy to assume it is easy.....

Can't answer on this. Besides that I'm affected as Xalan user I'm not interested in this bug. I always use the other including mechanisms provided by Cocoon.


|---------+---------------------------->
|         |           "Nils"           |
|         |           <[EMAIL PROTECTED]|
|         |           li.de>           |
|         |                            |
|         |           05/03/2004 10:33 |
|         |           AM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                          |
  |       To:       <[EMAIL PROTECTED]>                                                
                    |
  |       cc:                                                                          
                          |
  |       Subject:  AW: document() in xsl:variable -> low performance                  
                          |
  
>--------------------------------------------------------------------------------------------------------------|

Sorry, if I'm not the first one asking, but is it possible to get these lines out of your responses?


Nils wrote:

I tried to set $temp_lang with document() and to set $lang with $set_lang,
same result.

Christopher Painter-Wakefield wrote:


Does it help any to take another variable on some subtree of
the variable?

Variables don't help. One of those bugs is exactly about this while the other one is about document() itself.


Does it make a difference if you use xsltc?

Don't know about XSLTC.


Nils wrote:

<xsl:variable name="lang"><xsl:value-of
select="document('cocoon:/getxml')/context/lang"/></xsl:variable>

It seems you only need the variable as string and not as node. This means an explicite "cast" might help:


<xsl:variable name="lang" select="string(document('cocoon:/getxml')/context/lang)"/>

Sorry, that I had this idea that late :) I also don't know if it works, but this cast should decouple the value from the original XML structure.

Furthermore your original XSL using <xsl:value-of/> inside <xsl:variable/> is also only usable as string, but it contains a result tree fragment, i.e. a node structure. Even if you would like to use this as node structure (apply-templates, for-each, xpath expression on $lang) it would not work ("can not convert RTREEFRAG to node set"). To avoid this you should always use <xsl:variable name="" select=""/> instead of inner <xsl:value-of/>.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to