cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Greenyer <jgreen...@s-und-n.de>
Subject Problem with cinclude transformer in Cocoon 2.1
Date Fri, 25 Apr 2003 10:57:12 GMT
Hello Users,
after moving from Cocoon 2.0.4 to Cocoon 2.1 I now encounter a problem 
with the cinclude transformer.
As described here
http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html
I try to construct a post request like this:

        <cinclude:includexml>
            <cinclude:src>cocoon:/...action...</cinclude:src>
            <cinclude:configuration>
                <cinclude:parameter>
                  <cinclude:name>method</cinclude:name>
                  <cinclude:value>POST</cinclude:value>
                </cinclude:parameter>
            </cinclude:configuration>
            <cinclude:parameters>
            <cinclude:parameter>
              <cinclude:name>action</cinclude:name>
              <cinclude:value>save</cinclude:value>
            </cinclude:parameter>
                ...
              <cinclude:parameter>
                  <cinclude:name>
                    content
                  </cinclude:name>
                  <cinclude:value>
                    <!-- RIGHT HERE -->
                    <xsl:apply-templates/>
                </cinclude:value>
              </cinclude:parameter>
            </cinclude:parameters>
        </cinclude:includexml>

The <xsl:apply-templates/> will fill the 
<cinclude:value></cinclude:value> with the content of a complete XML-File.
Now the XML-Declaration (e.g. <?xml version="1.0" encoding="UTF-8"?>) is 
left out and won't be saved by the save-action I am posting to.
To work around that problem I tried this

                  <cinclude:value>
                    <![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]>
                    <xsl:apply-templates/>
                </cinclude:value>

which worked in Cocoon 2.0.4.
In Cocoon 2.1 the (saved) result looks like this:
               
                &lt;?xml version="1.0" encoding="UTF-8"?&gt;
                ...

Is there any way to manually add the correct XML-declarations to the 
request?
Or - which would be even better - is there any way to post the original 
XML-declaration of my XML-File?

Any help would be great!

Thanks,
Joel



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


Mime
View raw message