Hi Bertrand,

thanks for the pointer. I have tried setting up a view as suggested there 
but I am obviously doing something wrong because I either get errors or 
just my standard output. Below is (most of) my sitemap.xmap. When I call 
http://localhost:8888/auftrag2form/form-auftrag?cocoon-view=debug I only 
get my standard output :( 

Any help is greatly appreciated.

TIA, Jan

<!-- =========================== Views 
===================================== -->

    <map:views>
        <map:view name="debug" from-label="debug">
            <map:serialize type="xml" />
        </map:view>
    </map:views>

    <!-- =========================== Pipelines 
================================= -->

    <map:pipelines>

        <!-- ========================= Private Resources 
=========================== -->

        <map:pipeline type="caching" internal-only="true">

            <map:match pattern="formmodel/auftrag.xsd">
                <map:generate src="auftrag.xsd"/>
                <map:transform src="model.xsl">
                    <map:parameter name="rootElement" value="Auftrag" />
                </map:transform>
                <map:serialize type="xml" />
            </map:match>

            <map:match pattern="formtemplate/auftrag.xsd">
                <map:generate src="auftrag.xsd" />
                <map:transform src="template.xsl" label="debug">
                    <map:parameter name="rootElement" value="Auftrag" />
                </map:transform>
                <map:serialize type="xml" />
            </map:match>

            <map:match pattern="formbinding/auftrag.xsd">
                <map:generate src="auftrag.xsd" />
                <map:transform src="binding.xsl">
                    <map:parameter name="rootElement" value="Auftrag" />
                </map:transform>
                <map:serialize type="xml" />
            </map:match>

            <map:match pattern="form-display-pipeline/auftrag.xsd">
                <map:generate src="cocoon:/formtemplate/auftrag.xsd" />
                <map:transform type="forms"/>
                <map:transform type="i18n">
                    <map:parameter name="locale" value="en-US" />
                </map:transform>
                <map:transform
 src="context://samples/blocks/forms/resources/forms-samples-styling.xsl" 
/>
                <map:serialize type="html" />
            </map:match>
        </map:pipeline>

        <!-- ========================= Public Resources 
============================ -->

        <map:pipeline type="caching" internal-only="false">

            <map:match pattern="form-*">
                <map:call function="handleForm">
                    <map:parameter name="function" value="form2xml" />
                    <map:parameter name="form-definition"
                        value="cocoon:/formmodel/auftrag.xsd" />
                    <map:parameter name="documentUri" value="auftrag.xml" 
/>
                    <map:parameter name="bindingURI"
                        value="cocoon:/formbinding/auftrag.xsd" />
                    <map:parameter name="schemaName" value="auftrag" />
                </map:call>
            </map:match>

            <map:match pattern="*.continue">
                <map:call continuation="{1}" />
            </map:match>

            <map:match pattern="*.xml">
                <map:generate src="{1}.xml" />
                <map:serialize type="xml" />
            </map:match>

            <map:match pattern="resources/*/**">
                <map:read 
src="resource://org/apache/cocoon/{1}/resources/{2}" />
            </map:match>
        </map:pipeline>

    </map:pipelines>


And finally here is the form2xml function

function form2xml(form) {
  var documentUri = cocoon.parameters["documentUri"];
  var document = loadDocument(documentUri);
  var schemaName = cocoon.parameters["schemaName"];

  form.load(document);
  form.showForm("form-display-pipeline/" + schemaName + ".xsd");
  form.save(document);

  saveDocument(document, documentUri);
 
  cocoon.sendPage(documentUri);

}

[EMAIL PROTECTED] schrieb am 17.11.2006 08:45:56:

> On 11/17/06, Jan Behrens <[EMAIL PROTECTED]> wrote:
> 
> > ...could someone give me a hint on howto output the result of each
> > transformation within my cached pipeline (below)...
> 
> Use views, see http://cocoon.apache.org/2.1/userdocs/concepts/views.html
> 
> -Bertrand
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to