cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Please help with SourceWritingTransformer
Date Thu, 11 Jul 2002 15:10:00 GMT

I seem to have done everything right and was testing out the
SourceWritingTransformer and can't get it to write to a file.  I have the

<map:match pattern="test/*.xsp">
      <map:generate type ="serverpages" src="test/{1}.xsp"/>
      <map:transform type="sql">
          <map:parameter name="use-connection" value="dev_database"/>
      <map:transform src="test/metadata.xsl"/>
      <map:transform type="xslt-with-parameters" src="test/source.xsl">
          <map:parameter name="page-title" value="{page-title}"/>
      <map:transform type="tofile2">
          <map:parameter name="serializer" value="xml"/>
      <map:serialize type="xml"/>

I know that everything up to the second transformation works (until the
tofile2 trans which is the SWT).  The input to the SWT looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
   <source:write xmlns:source="" src="
      <KnowledgeObject xmlns:sql=""

The error I get is:
<?xml version="1.0" encoding="UTF-8" ?>
<source:write src="file:C:\jakarta-tomcat-3.2.4\webapps\cocoon\my.xml"
action="none" result="failed" serializer="xml" xmlns:source="">The src attribute doesn't resolve to a
writeable source and failed to cancel

   not sure what I am doing wrong???  Could anyone enlighten me?  It seems
   as though the file:C:\jakarta-tomcat-3.2.4\webapps\cocoon\my.xml is
   badly formed, but this path gets generated by the SWT as what I hard
   coded into the xsl sheet is below:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform xmlns:xsl="" version
    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:strip-space elements="*"/>

    <xsl:template match="/">
        <xsl:element name="source:write">
            <xsl:attribute name="src">context://my.xml</xsl:attribute>
            <xsl:copy-of select="."/>

Am I using the SWT wrong?  I'm a newbie to Cocoon and have tried everything
that I know how to do, so any help would be greatly appreciated!!


This message may contain confidential and/or privileged
information.  If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein.  If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message.  Thank you for your cooperation.

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message