You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Simon Mieth <si...@t-online.de> on 2003/11/17 13:12:22 UTC

Re: xml file generation

On Mon, 17 Nov 2003 19:42:52 +0800
"shivakumar" <a....@welcome-rt.com> wrote:

> Hi All,
> 
>  
> 
> I am using SourceWritingTransformer for generating output to xml, 
> 
> If I use like this it is working file.
> 
>  
> 
>  
> 
> <?xml version="1.0"?>
> 
>  
> 
> <page xmlns:source="http://apache.org/cocoon/source/1.0"
> 
>       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
> 
>  
> 
>       <title>SourceWritingTransformer Test Page 1</title>
> 
>       <content>
> 
>  
> 
>             <source:write src="result1.xml">
> 
>             <root>
> 
>                   <xsl:apply-templates
> select="/document/section[@class='BodyPage']/table[1]/row[@class='Result
> SetHeaderRow']"/> <xsl:apply-templates
> select="/document/section[@class='BodyPage']/table[2]/row[@class='Result
> SetRow']"/> <xsl:apply-templates
> select="/document/section[@class='BodyPage']/table[1]/row[@class='Result
> SetHeaderRow']"/>
> 
>             </root>
> 
>             </source:write>
> 
>       </content>
> 
> </page>
> 
>  
> 
>  
> 
> If I use xsl:stylesheet, SourceWritingTransformer is not generation the
> output file.
> 
>  
> 
>  
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> 
>                  xmlns:lxslt="http://xml.apache.org/xslt"
> 
>              xmlns:xsp="http://apache.org/xsp"
> 
>  
> 
> <xsl:template match="xsp:page">
> 
>  
> 
>             <source:write src="result1.xml">
> 
>  
> 
>             <xsl:apply-templates
> select="/document/section[@class='BodyPage']/table[1]/row[@class='Result
> SetHeaderRow']"/>  
> 
>             <xsl:apply-templates
> select="/document/section[@class='BodyPage']/table[2]/row[@class='Result
> SetRow']"/>
> 
>             <xsl:apply-templates
> select="/document/section[@class='BodyPage']/table[2]/row[@class='Result
> SetRow_Empty']"/>
> 
>             </source:write>
> 
>  
> 
>  
> 
> </xsl:template>
> 
> </xsl:stylesheet>
> 
>  
> 
>  
> 
> what's error in this code, please help me if any one known.
> 
>  
> 
> Thanks,
> 
> Shivakumar

I'm not sure, but have you add the NameSpace xmlns:source="http://apache.org/cocoon/source/1.0" to your stylesheet,like your first example?

Regards,
Simon




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