cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: [Woody] XSLT error
Date Wed, 04 Feb 2004 10:11:56 GMT

On 3 Feb 2004, at 18:20, Joerg Heinicke wrote:

> Hello Jeremy,
> I guess it was me :)

Thanks for your reply ;)

>>> cause: javax.xml.transform.TransformerException:   
>>> file:/Users/jerm/Development/Checkouts/Apache/cocoon-2.1/build/ 
>>> webapp/ samples/woody/resources/woody-field-styling.xsl: line 8:  
>>> Variable  'resources-uri' is multiply defined in the same scope.   
>>> file:/Users/jerm/Development/Checkouts/Apache/cocoon-2.1/build/ 
>>> webapp/ samples/woody/resources/woody-calendar-styling.xsl: line 8:  
>>> Variable  'resources-uri' is multiply defined in the same scope.   
>>> file:/Users/jerm/Development/Checkouts/Apache/cocoon-2.1/build/ 
>>> webapp/ samples/woody/resources/woody-advanced-field-styling.xsl:  
>>> line 8:  Variable 'resources-uri' is multiply defined in the same  
>>> scope.
>>> The variable 'resources-uri' is indeed defined on each of these  
>>> XSLTs,  which is IMHO unnecessary.
> This is not correct. This would only be correct if the files were  
> always used alltogether - but then we don't need different files and  
> we had a monolithic one. But I want to use the files separately.


> My refactoring changed the relations between the stylesheets in that  
> way, that they should be used independently on each other. So for  
> example the advanced styling now extends the basic field styling -  
> both need the uri and both should be used independently. For working  
> with only few of the stylesheets the param must be declared for every  
> stylesheet that uses it.


>> My changes from 19th Dec 2003 to remove the duplicate 'resources-uri'  
>>  variable declaration in several woody XSLT files appears to have  
>> been  reverted.
>> Any idea why?
>> I cannot find a record of the revision in CocoonCVS mailings.
> Here it is:  

Thanks for clearing that puzzle up

>> Does anyone object to me changing it back again to remove the   
>> duplicates?
> To be honest: yes. It's part of the XSLT spec that this must be  
> handled by the XSLT processor. The error message "multiply defined in  
> the same scope" is just wrong, it's not the same scope.


> I would like to see it resolved locally for you, not by making the  
> stylesheets dependent on each other. The problem is now that it just  
> does not work for you. But why? I have it working on my system at work  
> (using Xalan as it is the default processor IIRC).

They work fine with Xalan, but not with XSLTC.

> Know I see possible reasons:
> - Your Xalan version is newer than mine (I use 2.5.1 because of  
> - Your Xalan version is older than mine. You were not the first having  
> an endorsed libs problem without knowing it ;-) Can you please check  
> your Xalan version in use using  

I have the current CVS.
It is using xalan-2.5.2.jar (I checked)

> - You never tried Xalan, but only XSLTC. I will test it tomorrow if it  
> is just a problem of XSLTC.
> I don't see any additional difference between our systems, but the  
> working of the Woody samples in comparison to your project is indeed  
> strange.

I am deeply suspecting XSLTC now.
Even after removing the duplicated variable declarations, I was unable  
to get the stylesheets to work with XSLTC this time.

It is very difficult to work out why .... XSLTC's error messages are  
not useful.

After a brute-force binary search for the template causing the trouble,  
it came down to this template at the end of 'woody-field-styling.xsl' :

   <xsl:template match="@*|node()" priority="-1">
       <xsl:apply-templates select="@*|node()"/>

There is clearly nothing wrong with this :(

So woody does not seem usable with XSLTC.
Can anyone else confirm this?

regards Jeremy
View raw message