cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carmona Perez, David" <DPerez...@fcc.es>
Subject RE: Problem with cinclude transformer in Cocoon 2.1
Date Fri, 25 Apr 2003 11:25:42 GMT
Hi Joel,

Sorry I can't help you, but I have some questions.

I didn't know the cinclude transformer could be used in this way.

So, <cinclude:includexml>  will be replaced by the data gathered from calling the URL
 cocoon:/...action...?action=save&content=.... .  Won't it?  Or aren't the given parameters
request parameters?

I suppose that in the pipeline, a xlst transformation will be processed before the CInclude
transformer, in order to process the <xsl:apply-templates/>.  Doesn't it?

Can I get fragments from the original document with an XPointer like it can be done with the
XInclude transformer?

------
David

-----Mensaje original-----
De: Joel Greenyer [mailto:jgreenyer@s-und-n.de]
Enviado el: viernes, 25 de abril de 2003 12:57
Para: cocoon-users@xml.apache.org
Asunto: Problem with cinclude transformer in Cocoon 2.1

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

---------------------------------------------------------------------
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