You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorg Heymans <jh...@domek.be> on 2003/12/01 17:13:22 UTC

attributes wierdness

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


Re: attributes wierdness

Posted by Jorg Heymans <jh...@domek.be>.
<sigh>
And i always thought "what the hell are they on about?" when i saw posts 
about "endorsed libs" probs :-) I am just surprised this hasn't stung me 
  before. Right i'll upgrade "again" then and report back.

thanks
Jorg

Joerg Heinicke wrote:

> On 03.12.2003 15:29, Jorg Heymans wrote:
> 
>> Interesting tnx for the pointer, it says:
>>
>> 1.4.1_02 1.1 D:\compilers\j2sdk1.4.1_02\jre\lib\ext not-present 2.0
>> D:\compilers\j2sdk1.4.1_02\lib\tools.jar;D:\servers\jakarta-tomcat-4.1.29\bin\bootstrap.jar 
>> not-present 
>> D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xercesImpl.jar;D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xmlParserAPIs.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\rt.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\i18n.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\sunrsasign.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jsse.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jce.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\charsets.jar;D:\compilers\j2sdk1.4.1_02\jre\classes 
>> 2.0fd Xalan;Java;Xalan Java 2.2.D11; 2.0 not-present
> 
> 
> Hah! --------------^^^^^^^^^^^^^^^^^^
> 
>> now what should i make of this? Do you know how to read this output?
> 
> 
> "Xalan 2.2.D11" means you are using the Xalan version from JDK 1.4.1. 
> You can upgrade the XML libraries in Cocoon as much as you want - 
> nothing will change :-) It's the infamous endorsed libs problem. Try to 
> fix it and report back. I guess the problem won't exist any longer.
> 
> Joerg
> 
>> Joerg Heinicke wrote:
>>
>>> On 02.12.2003 10:27, Jorg Heymans wrote:
>>>
>>>> the following works  (note the double slash in front of aggregation)
>>>>
>>>> <jar:entry
>>>> src="c:/temp/{//aggregation/request/requestParameters/parameter[@name='output0']/value}"/> 
>>>>
>>>>
>>>> which is in any case suboptimal, but what the heck :)
>>>>
>>>> very wierd though.. I ran the transformation from xalan command line 
>>>> and it also worked.
>>>>
>>>> Note that upgrading to xalan and xerces from cocoon 2.1 also did not 
>>>> solve the problem
>>>>
>>>> Shall i put this in bugzilla?
>>>
>>>
>>>
>>>
>>> You can :-) But only with a testcase, otherwise it will be ignored I 
>>> guess. These things are to hard to be reproduced.
>>>
>>> Are you sure you are using the Xalan version you expect? Try it with 
>>> the environment check stylesheet: 
>>> http://xml.apache.org/xalan-j/faq.html#environmentcheck. Sometimes it 
>>> unfolds problems, where you did not know that there is even one :-)
>>>
>>> Joerg
> 
> 
> 
> ---------------------------------------------------------------------
> 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


The owls aren't what they seem (was : Re: attributes wierdness)

Posted by Jorg Heymans <jh...@domek.be>.
... to quote from the famous twin peaks series ...

or in cocoon-speak : your pipeline fragment is not giving you what you 
think it is ;)

The good news : I solved the issue and it wasn't a xalan bug (see above)
The bad news : By "solving" the endorsed-lib problem I am now actually 
using the Xalan version i always thought i was using and my code is 
breaking down all over the place, yippeeee

So i upgraded to the xalan-xerces libs that the 2.1 branch is currently 
using and now everything is working again... !!!WIERD!!!

Example of code breaking down:
NodeList valueNode = parameter.getElementsByTagName("value");
Element valueElement = (Element)valueNode.item(0);
String value = valueElement.getFirstChild().getNodeValue();

Strint value had only a truncated version of the actual nodevalue, 
sometimes the first 10chars, sometimes more, sometimes less but never 
the complete string


<barf>
Jorg

Joerg Heinicke wrote:

> On 03.12.2003 15:29, Jorg Heymans wrote:
> 
>> Interesting tnx for the pointer, it says:
>>
>> 1.4.1_02 1.1 D:\compilers\j2sdk1.4.1_02\jre\lib\ext not-present 2.0
>> D:\compilers\j2sdk1.4.1_02\lib\tools.jar;D:\servers\jakarta-tomcat-4.1.29\bin\bootstrap.jar 
>> not-present 
>> D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xercesImpl.jar;D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xmlParserAPIs.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\rt.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\i18n.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\sunrsasign.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jsse.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jce.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\charsets.jar;D:\compilers\j2sdk1.4.1_02\jre\classes 
>> 2.0fd Xalan;Java;Xalan Java 2.2.D11; 2.0 not-present
> 
> 
> Hah! --------------^^^^^^^^^^^^^^^^^^
> 
>> now what should i make of this? Do you know how to read this output?
> 
> 
> "Xalan 2.2.D11" means you are using the Xalan version from JDK 1.4.1. 
> You can upgrade the XML libraries in Cocoon as much as you want - 
> nothing will change :-) It's the infamous endorsed libs problem. Try to 
> fix it and report back. I guess the problem won't exist any longer.
> 
> Joerg
> 
>> Joerg Heinicke wrote:
>>
>>> On 02.12.2003 10:27, Jorg Heymans wrote:
>>>
>>>> the following works  (note the double slash in front of aggregation)
>>>>
>>>> <jar:entry
>>>> src="c:/temp/{//aggregation/request/requestParameters/parameter[@name='output0']/value}"/> 
>>>>
>>>>
>>>> which is in any case suboptimal, but what the heck :)
>>>>
>>>> very wierd though.. I ran the transformation from xalan command line 
>>>> and it also worked.
>>>>
>>>> Note that upgrading to xalan and xerces from cocoon 2.1 also did not 
>>>> solve the problem
>>>>
>>>> Shall i put this in bugzilla?
>>>
>>>
>>>
>>>
>>> You can :-) But only with a testcase, otherwise it will be ignored I 
>>> guess. These things are to hard to be reproduced.
>>>
>>> Are you sure you are using the Xalan version you expect? Try it with 
>>> the environment check stylesheet: 
>>> http://xml.apache.org/xalan-j/faq.html#environmentcheck. Sometimes it 
>>> unfolds problems, where you did not know that there is even one :-)
>>>
>>> Joerg
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: attributes wierdness

Posted by Joerg Heinicke <jo...@gmx.de>.
On 03.12.2003 15:29, Jorg Heymans wrote:

> Interesting tnx for the pointer, it says:
> 
> 1.4.1_02 1.1 D:\compilers\j2sdk1.4.1_02\jre\lib\ext not-present 2.0
> D:\compilers\j2sdk1.4.1_02\lib\tools.jar;D:\servers\jakarta-tomcat-4.1.29\bin\bootstrap.jar 
> not-present 
> D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xercesImpl.jar;D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xmlParserAPIs.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\rt.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\i18n.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\sunrsasign.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jsse.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jce.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\charsets.jar;D:\compilers\j2sdk1.4.1_02\jre\classes 
> 2.0fd Xalan;Java;Xalan Java 2.2.D11; 2.0 not-present

Hah! --------------^^^^^^^^^^^^^^^^^^

> now what should i make of this? Do you know how to read this output?

"Xalan 2.2.D11" means you are using the Xalan version from JDK 1.4.1. 
You can upgrade the XML libraries in Cocoon as much as you want - 
nothing will change :-) It's the infamous endorsed libs problem. Try to 
fix it and report back. I guess the problem won't exist any longer.

Joerg

> Joerg Heinicke wrote:
> 
>> On 02.12.2003 10:27, Jorg Heymans wrote:
>>
>>> the following works  (note the double slash in front of aggregation)
>>>
>>> <jar:entry
>>> src="c:/temp/{//aggregation/request/requestParameters/parameter[@name='output0']/value}"/> 
>>>
>>>
>>> which is in any case suboptimal, but what the heck :)
>>>
>>> very wierd though.. I ran the transformation from xalan command line 
>>> and it also worked.
>>>
>>> Note that upgrading to xalan and xerces from cocoon 2.1 also did not 
>>> solve the problem
>>>
>>> Shall i put this in bugzilla?
>>
>>
>>
>> You can :-) But only with a testcase, otherwise it will be ignored I 
>> guess. These things are to hard to be reproduced.
>>
>> Are you sure you are using the Xalan version you expect? Try it with 
>> the environment check stylesheet: 
>> http://xml.apache.org/xalan-j/faq.html#environmentcheck. Sometimes it 
>> unfolds problems, where you did not know that there is even one :-)
>>
>> Joerg


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


Re: attributes wierdness

Posted by Jorg Heymans <jh...@domek.be>.
Interesting tnx for the pointer, it says:

1.4.1_02 1.1 D:\compilers\j2sdk1.4.1_02\jre\lib\ext not-present 2.0
D:\compilers\j2sdk1.4.1_02\lib\tools.jar;D:\servers\jakarta-tomcat-4.1.29\bin\bootstrap.jar 
not-present 
D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xercesImpl.jar;D:\servers\jakarta-tomcat-4.1.29\common\endorsed\xmlParserAPIs.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\rt.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\i18n.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\sunrsasign.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jsse.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\jce.jar;D:\compilers\j2sdk1.4.1_02\jre\lib\charsets.jar;D:\compilers\j2sdk1.4.1_02\jre\classes 
2.0fd Xalan;Java;Xalan Java 2.2.D11; 2.0 not-present

now what should i make of this? Do you know how to read this output?

Joerg Heinicke wrote:

> On 02.12.2003 10:27, Jorg Heymans wrote:
> 
>> the following works  (note the double slash in front of aggregation)
>>
>> <jar:entry
>> src="c:/temp/{//aggregation/request/requestParameters/parameter[@name='output0']/value}"/> 
>>
>>
>> which is in any case suboptimal, but what the heck :)
>>
>> very wierd though.. I ran the transformation from xalan command line 
>> and it also worked.
>>
>> Note that upgrading to xalan and xerces from cocoon 2.1 also did not 
>> solve the problem
>>
>> Shall i put this in bugzilla?
> 
> 
> You can :-) But only with a testcase, otherwise it will be ignored I 
> guess. These things are to hard to be reproduced.
> 
> Are you sure you are using the Xalan version you expect? Try it with the 
> environment check stylesheet: 
> http://xml.apache.org/xalan-j/faq.html#environmentcheck. Sometimes it 
> unfolds problems, where you did not know that there is even one :-)
> 
> Joerg
> 
> 
> ---------------------------------------------------------------------
> 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


Re: attributes wierdness

Posted by Joerg Heinicke <jo...@gmx.de>.
On 02.12.2003 10:27, Jorg Heymans wrote:

> the following works  (note the double slash in front of aggregation)
> 
> <jar:entry
> src="c:/temp/{//aggregation/request/requestParameters/parameter[@name='output0']/value}"/> 
> 
> 
> which is in any case suboptimal, but what the heck :)
> 
> very wierd though.. I ran the transformation from xalan command line and 
> it also worked.
> 
> Note that upgrading to xalan and xerces from cocoon 2.1 also did not 
> solve the problem
> 
> Shall i put this in bugzilla?

You can :-) But only with a testcase, otherwise it will be ignored I 
guess. These things are to hard to be reproduced.

Are you sure you are using the Xalan version you expect? Try it with the 
environment check stylesheet: 
http://xml.apache.org/xalan-j/faq.html#environmentcheck. Sometimes it 
unfolds problems, where you did not know that there is even one :-)

Joerg


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


Re: attributes wierdness

Posted by Jorg Heymans <jh...@domek.be>.
the following works  (note the double slash in front of aggregation)

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


which is in any case suboptimal, but what the heck :)

very wierd though.. I ran the transformation from xalan command line and 
it also worked.

Note that upgrading to xalan and xerces from cocoon 2.1 also did not 
solve the problem

Shall i put this in bugzilla?


Thanks
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


Re: attributes wierdness

Posted by Jorg Heymans <jh...@domek.be>.
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


Re: attributes wierdness

Posted by Joerg Heinicke <jo...@gmx.de>.
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


Re: attributes wierdness

Posted by Jorg Heymans <jh...@domek.be>.
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
> 
> 


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


Re: attributes wierdness

Posted by Jorg Heymans <jh...@domek.be>.
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