cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: [Woody] XSLT error
Date Tue, 03 Feb 2004 18:20:54 GMT
Hello Jeremy,

I guess it was me :)

>> 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: 
http://marc.theaimsgroup.com/?l=xml-cocoon-cvs&m=107479455713545&w=4

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

Know I see possible reasons:
- Your Xalan version is newer than mine (I use 2.5.1 because of 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24457).
- 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 
http://xml.apache.org/xalan-j/faq.html#environmentcheck?
- 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.

Joerg

Mime
View raw message