cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: attributes wierdness
Date Mon, 01 Dec 2003 17:31:45 GMT
Sounds like a nasty bug in Xalan or similar. Every little change can 
solve the problem I guess. First you can try a log transformer before 
the serializer to see where exactly it gets lost. Second you can change from

<jar:entry>
<xsl:attribute name="src"><xsl:value-of select="concat("c:/temp/", 
/aggregation/request/requestParameters/parameter[@name='output0']/value)"/></xsl:attribute>
</jar:entry>

to

<jar:entry 
src="c:/temp/{/aggregation/request/requestParameters/parameter[@name='output0']/value}"/>

Furthermore that's shorter, but no guarantee that this now works. :-)

What exactly is debug2 view doing? Also only serializing?

Joerg

On 01.12.2003 18:05, Jorg Heymans wrote:

> further narrowing down this cunty problem.
> 
> <map:transform src="stylesheets/make_jarfile.xsl" label="debug2"/>
> <map:serialize type="xml" />
> 
> After the transformation (label=debug2) the xml looks like this
> 
> <jar:archive>
> <jar:entry name="images/dynamicimage.jpg" src="c:/temp/091cb8492"/>
> <jar:entry name="test.bmp" src="D:/temp/images/newdir/East.bmp"/>
> </jar:archive>
> 
> After the serializer it looks like this
> 
> <jar:archive>
> <jar:entry name="images/dynamicimage.jpg" src="c:/temp/"/>
> <jar:entry name="test.bmp" src="D:/temp/images/newdir/East.bmp"/>
> </jar:archive>
> 
> This proves my stylesheet is right, but somehow the xml serializer is 
> not picking up whatever i am doing
> 
> Any thoughts ( i guess this is a fairly advanced topic)? Alternatively, 
> any thoughts how i can debug into this so i know exactly there it is 
> losing part of the src attribute?
> 
> tnx
> Jorg
> 
> Jorg Heymans wrote:
> 
>> ok i narrowed down the problem to this line in my stylesheet
>>
>> <xsl:attribute name="src"><xsl:value-of select="concat("c:/temp/", 
>> /aggregation/request/requestParameters/parameter[@name='output0']/value)"/></xsl:attribute>

>>
>>
>>
>> Now the weird thing is that using the cocoon-view labels the output 
>> comes out ok, but when I let the xml reach the serializer then this
>>
>> /aggregation/request/requestParameters/parameter[@name='output0']/value
>>
>> is empty.
>>
>> Hope this rings a bell with anyone.
>>
>>
>> Jorg Heymans wrote:
>>
>>> Input xml
>>>
>>> <jar:archive xmlns:jar="http://apache.org/cocoon/jar-archive/1.0">
>>>   <jar:entry name="test.bmp" src="D:/temp/East.bmp"/>
>>> </jar:archive>
>>>
>>> is transformed into
>>>
>>> <jar:archive xmlns:jar="http://apache.org/cocoon/jar-archive/1.0">
>>>   <jar:entry name="images/dynamicimage.jpg" src="c:/temp/ca6ea9b7"/>
>>>   <jar:entry name="test.bmp" src="D:/temp/East.bmp"/>
>>> </jar:archive>
>>>
>>> Using the following sitemap snippet
>>>
>>> <map:aggregate element="aggregation" label="debug1">
>>>   <map:part src="file://{defaults:GFX-TEMPLATES}{1}.xml"/>
>>>   <map:part src="cocoon:/uniqueid/{2}"/>
>>> </map:aggregate>
>>> <map:transform src="stylesheets/make_jarfile.xsl" label="debug2"/>
>>> <map:serialize type="jar" />
>>>
>>>
>>> Now in my jarfile serializer for this xml
>>>
>>>     public void startElement(
>>>         String namespaceURI,
>>>         String localName,
>>>         String qName,
>>>         Attributes atts)
>>> ...
>>>
>>> The src attribute for
>>>   <jar:entry name="images/dynamicimage.jpg" src="c:/temp/ca6ea9b7"/>
>>> comes out as "c:/temp/" and not as "c:/temp/ca6ea9b7"
>>>
>>>
>>> What could be causing this? I'm on cocoon 2.0.4, have never seen this 
>>> behaviour with any of the serializers i've written before.
>>>
>>>
>>> Tnx
>>> Jorg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message