cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: XSLT transformation
Date Thu, 04 Aug 2005 07:56:59 GMT
Marc Salvetti wrote:
> Yes, this is the expected behavior, the pipe will always stop at the 
> first serializer, or before if there is an error, no matter what's after 
> it. I just left the second transform because i always use this technique 
> to debug my pipes : moving a serialize type="xml"  line to differents 
> places in the pipe to figure the guilty transform.
> 
> So in your case, .if the following give no error
> 
>  <map:generate type="file" src="content/showsyscontainer.xml"/>
>  <map:transform type="bdbxml"/>
>  <map:serialize type="xml"/>
> 
> It just means your bdbxml class is ok.
> So you can look for the pb in containerslist.xsl

Now, the fact that your approach works, well, part of me suspects it is 
   a bug in the pipeline processor! A more formal way to do it would be 
to set up a view:

<map:view from-label="xml" name="xml">
   <map:serialize type="xml"/>
</map:view>

And then to move label="xml" as an attribute from entry to entry within 
your pipeline.

Regards, Upayavira

> Antony Grinyer a écrit :
> 
>> Thanks for the idea Mark - I tried this and it just displays the XML? 
>> Seems it's stopping at the  <map:serialize type="xml"/> and not moving 
>> onto <map:transform type="xslt" src="style/xsl/containerslist.xsl"/>?
>>
>> Thanks,
>> Ant
>>
>>  
>>
>>> -----Original Message-----
>>> From: Marc Salvetti [mailto:marc@notremanou.net] Sent: 03 August 2005 
>>> 06:26 pm
>>> To: users@cocoon.apache.org
>>> Subject: Re: XSLT transformation
>>>
>>> You can just try the following pipe
>>>
>>> <map:match pattern="listcontainers">
>>>  <map:generate type="file" src="content/showsyscontainer.xml"/>
>>>  <map:transform type="bdbxml"/>
>>>  <map:serialize type="xml"/>
>>>  <map:transform type="xslt" src="style/xsl/containerslist.xsl"/>
>>>  <map:serialize type="html"/>
>>> </map:match>
>>>
>>> if you get the same error, the pb is in the java class, if not, it's 
>>> in the stylesheet :)
>>>
>>> Marc
>>>
>>> Antony Grinyer a écrit :
>>>
>>>   
>>>
>>>> Hi,
>>>>
>>>> A have a simple sitemap entry as below:
>>>>
>>>> <map:match pattern="listcontainers">
>>>> <map:generate type="file" src="content/showsyscontainer.xml"/>
>>>> <map:transform type="bdbxml"/>
>>>> <map:transform type="xslt" src="style/xsl/containerslist.xsl"/>
>>>> <map:serialize type="html"/>
>>>> </map:match>
>>>>
>>>> The generator is a simple XML file which is passed to a java class 
>>>> transformer ( referenced as type="bdbxml") which returns XML results.
>>>> This all works fine if I use <map:serialize type="xml"/>  to simply

>>>> output the XML, however if I try to transform the XML output     
>>>
>>> with the   
>>>
>>>> XSLT transformer above I get an error:
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>> Error executing pipeline.
>>>>>>    
>>>>>>         
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>> org.apache.cocoon.ProcessingException: Error executing pipeline.:

>>>>>> java.lang.RuntimeException
>>>>>>    
>>>>>>         
>>>>
>>>> I know the XSLT containerslist.xsl is correct as I've tried     
>>>
>>> it against   
>>>
>>>> some sample output XML in XMLSpy, but it appears that when I     
>>>
>>> add this   
>>>
>>>> XSLT transformer I get a Processing Exception?
>>>>
>>>> In the sitemap.log it is reported as:
>>>>
>>>> Unable to get parser: java.lang.RuntimeException:
>>>> java.lang.NullPointerException
>>>>
>>>> Any ideas please? (for a Cocoon newbie) Thx in advance, Ant



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


Mime
View raw message