Im using the sourcewriter currently with cocoon 2.1 cvs head updated around 2/2/2004. It does work with my setup:
<map:transformer logger="sitemap.transformer.write-source" name="write-source" src="org.apache.cocoon.transformation.SourceWritingTransformer"/> in my pipeline: <map:transform type="write-source"> <map:parameter name="serializer" value="xml"/> </map:transform> my instructions: <source:write> <source:source><xsp:expr>path</xsp:expr></source:source> <source:fragment> <cinclude:include> <xsp:attribute name="src"><xsp:expr>url</xsp:expr></xsp:attribute> </cinclude:include> </source:fragment> </source:write> As far as I can see, your setup does not differ very much, but maybe you can try the <map:transformer ..> that I use (standard sitemap). Have you checked your xml before the sourcewriting transformer? Jan ----- Original Message ----- From: "Anthony Davies" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 12, 2004 4:35 PM Subject: org.apache.cocoon.transformation.SourceWritingTransformer > Hi, > > I'm trying to get this transformer working so that I can write xml on > the fly on my server. Unfortunately, I can't get this component to work. > The relevant sitemap bits as I have them are: > > <map:transformer logger="sitemap.transformer.tofile" name="tofile" > src="org.apache.cocoon.transformation.SourceWritingTransformer"> > <map:parameter name="serializer" value="xml"/> > </map:transformer> > > <map:generate src="doclist.xml"/> > <map:transform src="adminXSL/altersubmit.xsl"/> > <map:transform type="tofile"> > <map:parameter name="serializer" value="xml"/> > </map:transform> > > altersubmit.xsl is: > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format" > xmlns:source="http://www.apache.org/cocoon/transformer/source"> > <xsl:output method="xml" encoding="ISO-8859-1" indent="yes" > doctype-system="doclist.dtd"/> > <xsl:param name="id"/> > <xsl:param name="product"/> > <xsl:param name="suppgroup"/> > <xsl:param name="version"/> > <xsl:param name="comment"/> > > <xsl:template match="/"> > <source:write create="true"> > <source:source>file://poo.xml</source:source> > <source:fragment> > <xsl:apply-templates/> > </source:fragment> > </source:write> > </xsl:template> > > <xsl:template match="*"> > <xsl:choose> > <xsl:when test="@id = $id"> > <xsl:choose> > <xsl:when test="starts-with($id, 'p')"> > <xsl:element name="Product"> > <xsl:attribute name="ProductName"><xsl:value-of > select="$product"/></xsl:attribute> > <xsl:attribute name="id"><xsl:value-of > select="$id"/></xsl:attribute> > <xsl:element name="Comment"><xsl:value-of > select="$comment"/></xsl:element> > <xsl:apply-templates/> > </xsl:element> > </xsl:when> > <xsl:when test="starts-with($id, 's')"> > <xsl:element name="SupplementalGroup"> > <xsl:attribute name="GroupName"><xsl:value-of > select="$suppgroup"/></xsl:attribute> > <xsl:attribute name="id"><xsl:value-of > select="$id"/></xsl:attribute> > <xsl:apply-templates/> > </xsl:element> > </xsl:when> > <xsl:when test="starts-with($id, 'v')"> > <xsl:element name="Version"> > <xsl:attribute name="Number"><xsl:value-of > select="$version"/></xsl:attribute> > <xsl:attribute name="id"><xsl:value-of > select="$id"/></xsl:attribute> > <xsl:apply-templates/> > </xsl:element> > </xsl:when> > </xsl:choose> > </xsl:when> > <xsl:otherwise> > <xsl:copy> > <xsl:apply-templates select="@*"/> > <xsl:apply-templates/> > </xsl:copy> > </xsl:otherwise> > </xsl:choose> > </xsl:template> > > <xsl:template match="text()"> > <xsl:copy> > <xsl:apply-templates select="@*"/> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > > <xsl:template match="@*"> > <xsl:copy> > <xsl:apply-templates select="@*"/> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > > </xsl:stylesheet> > > Any help would be very much appreciated. > > Thanks, > > Anthony Davies. > Documentation Engineer > MSN: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]