Thanks Erik. I got my test app working once, but the second time I tried to submit, I get an empty document again, and it no longer works, even after restarting. The error message I am getting is:

2003-03-03 10:59:45,812 ERROR OXF ProcessorServlet - Exception with no location data
java.lang.ClassCastException: org.dom4j.util.UserDataAttribute
at org.orbeon.oxf.pipeline.processors.XFormsInput$1.readImpl(XFormsInput.java:104)
at org.orbeon.oxf.pipeline.processors.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:767)


at org.orbeon.oxf.pipeline.processors.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:871)
at org.orbeon.oxf.pipeline.processors.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:294)
at org.orbeon.oxf.pipeline.processors.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:298)
at org.orbeon.oxf.pipeline.processors.IdentityProcessor$1.readImpl(IdentityProcessor.java:26)
at org.orbeon.oxf.pipeline.processors.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:767)


at org.orbeon.oxf.pipeline.processors.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:871)
at org.orbeon.oxf.pipeline.processors.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:294)
at org.orbeon.oxf.pipeline.processors.PipelineProcessor$InternalTopOutput$1.run(PipelineProcessor.java
:336)


rest of the trace is omitted.

The xpl I am using is:

<?xml version="1.0" encoding="UTF-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline";>
<p:param name="instance" type="input"/>
<p:processor uri="oxf/processor/xslt">
<!--<p:input name="config" href="Merge.xsl"/>-->
<p:input name="config">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<!-- the param for the other xml file that will
be merged with the xml that was submitted -->
<xsl:param name="catalog">CourseCatalog.xml</xsl:param>
<xsl:template match="/">
<CourseSchedules>
<h1>Stylesheet worked.</h1>
<xsl:apply-templates/>
</CourseSchedules>
</xsl:template>
<xsl:template match="ClassSchedules">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="ClassSchedule">
<xsl:variable name="id" select="@id"/>
<Course id="{$id}">
<!--<xsl:copy-of select="document($catalog)//[EMAIL PROTECTED]/*"/>-->
<xsl:copy-of select="*|@*|text()"/>
</Course>
</xsl:template>
</xsl:stylesheet>
</p:input>
<p:input name="data" href="#instance"/>
<p:output name="data" id="scheduled-course"/>
</p:processor>
<p:processor uri="oxf/processor/xml-serializer">
<p:input name="config">
<config/>
</p:input>
<p:input name="data" href="#scheduled-course"/>
</p:processor>
</p:config>


thanks again for all your help,

calvin



Erik Bruchez wrote:
Hi Calvin,

Your p:param MUST be named "instance", not "class-schedule". In most cases that kind of mistake generates user-friendly errors, but it looks like you hit an error reporting bug. This will be fixed in 1.5.1.

BTW you also need to create a root element in your "/" template, otherwise your XML output won't be well-formed.

-Erik

Calvin Smith wrote:

Hi Julien,

Thanks so much for the help. I substituted the xpl doc you gave me for the one I had, and added the entry you gave me to the controller, but I still get the same result: a blank page except for the Orbeon copyright notice. The log says: "2003-02-28 11:31:07,796 ERROR OXF ProcessorServlet - Exception with no location data" with a huge stack trace that begins with a NullPointerException. Perhaps this means that some data input in the pipeline is null because the output wasn't assigned properly in the previous step?

The pipeline I'm using is the same as you supplied, with a few changes to the stylesheet:

<?xml version="1.0" encoding="UTF-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline";>
<p:param name="class-schedule" type="input"/>
<p:processor uri="oxf/processor/xslt">
<!--<p:input name="config" href="Merge.xsl"/>-->
<p:input name="config">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<!-- the param for the other xml file that will
be merged with the xml that was submitted -->
<xsl:param name="catalog">CourseCatalog.xml</xsl:param>
<xsl:template match="/">
<xsl:text>Matched root</xsl:text>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="ClassSchedules">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="ClassSchedule">
<xsl:variable name="id" select="@id"/>
<Course id="{$id}">
<!--<xsl:copy-of select="document($catalog)//[EMAIL PROTECTED]/*"/>-->
<xsl:copy-of select="*"/>
</Course>
</xsl:template>
</xsl:stylesheet>
</p:input>
<p:input name="data" href="#class-schedule"/>
<p:output name="data" id="scheduled-course"/>
</p:processor>
<p:processor uri="oxf/processor/xml-serializer">
<p:input name="config">
<config/>
</p:input>
<p:input name="data" href="#scheduled-course"/>
</p:processor>
</p:config>


And the relevant entry in the controller.xml file is what you gave me:

<page path-info="/hello/createClass" model="oxf:/hello/CreateScheduledCourse.xpl" xforms="oxf:/hello/course-schedule.xml"/>

The xforms model (course-schedule.xml) and the other files are in the following directory, relative to webapps: oxf\WEB-INF\resources\hello.

Any ideas about what the problem could be, or how I could go about debugging this?

thanks,

calvin


Reply via email to