I found the problem. The reason was that I used a CDATA section in my XSLT
to output the <wt:form-template> tag like
<xsl:text disable-output-escaping="yes"><![CDATA[ <wt:form-template
action="#{$continuation/id}.continue" method="POST">]]></xsl:text>

The reason I used a cdata section was that xalan else tries to replace the
variable $continuation which is not a variable...
If i want to use a CDATA section with xalan I suppose I have to add some
parameter to preserve CDATA section, I'm a little bit confused why he
outputs the CDATA section if I just do a transformation in the browser but
not inside a pipeline ??
Anyway I now used a variable to define the action attribute so that I don't
have to use a CDATA section anymore.

wouter

-----Original Message-----
From: Bruno Dumon [mailto:[EMAIL PROTECTED]
Sent: mercredi 26 novembre 2003 19:28
To: [EMAIL PROTECTED]
Subject: Re: Woody: problems configuring pipeline


On Wed, 2003-11-26 at 12:04, [EMAIL PROTECTED] wrote:
> Hello,
> 
> I have a pipeline which transform an XML file into a Woody template file.
(I
> need to do this because of "migration to Woody reasons") When I try to use
> this pipeline in another pipeline to show a "Woody" form than I get an
> exception:
> org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> java.lang.RuntimeException: org.xml.sax.SAXException: wt:widget-label
cannot
> be used outside a wt:form-template element
> However I do not generate a template file with wt:widget-label tags
outside
> wt:form-template file.
> 
> The pipeline which transform an XML to an template file looks like:
> 
> <map:match pattern="toWT/*.xml">
>       <map:generate src="{1}.xml"/>
>       <map:transform src="toWT.xslt"/>
>       <map:serialize type="xml"/>
> </map:match>
> 
> The pipeline which shows my form:
> 
> <map:match pattern="original">
>       <map:call function="original"/>
> </map:match>
> 
> <map:match pattern="originalForm">
> <map:generate src="cocoon:/toWT/test.xml"/>
>       <map:transform type="woody"/>
>       <map:transform type="i18n">
>       <map:parameter name="locale" value="en-US"/>
>       </map:transform>
> <map:transform src="resources/woody-samples-styling.xsl"/-->
> <map:serialize/>
> </map:match>
> 
> 
> The remarkable thing is that when I first invoke in a browser the "toWT"
> pipeline , save the generated Woody template file into "temp.xml" and then
> modify the pipeline above to use that file instead of calling the "toWT"
> pipeline like
<snip/>

Assuming your XSLT doesn't contain any errors (can't think of what it
would be), this is probably a bug in Xalan producing SAX events
containing wrong namespaces or something. Are you using Xalan
interpretive or XSLTC?

To debug this problem, add a logtransformer in the pipeline producing
the form template:

<map:match pattern="toWT/*.xml">
        <map:generate src="{1}.xml"/>
        <map:transform src="toWT.xslt"/>
        <map:transform type="log">
           <map:parameter name="logfile" value="out.txt"/>
        </map:transform>
        <map:serialize type="xml"/>
</map:match>

and check that the startElement event for the form-template element
contains the correct namespace and local name. If unsure, just post the
relevant part of the output here.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [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]

Reply via email to