cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: Woody: problems configuring pipeline
Date Wed, 26 Nov 2003 18:28:18 GMT
On Wed, 2003-11-26 at 12:04, 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

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:serialize type="xml"/>

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                   
Outerthought - Open Source, Java & XML Competence Support Center                

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

View raw message