cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simon.mi...@t-online.de (Simon Mieth)
Subject Re: xml file generation
Date Mon, 17 Nov 2003 12:12:22 GMT
On Mon, 17 Nov 2003 19:42:52 +0800
"shivakumar" <a.shivakumar@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


Mime
View raw message