cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: attributes wierdness
Date Tue, 02 Dec 2003 08:22:53 GMT
bah :)

The log transformer indicates the same. After the transformation the src 
attribute is partly lost, so the serializer never picks it up.

The debug2 view is only serializing yes.


how would cocoon feel if i upgrade the xalan libs? Is it risky to do on 
2.0.4?

i have tried many different variants on below stylesheet but it's not 
picking it up ..

Jorg

Joerg Heinicke wrote:

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


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


Mime
View raw message