Hi Calvin,

- You must use the p:input's href attribute to refer to an existing
p:output in the same pipeline. The ref attribute is reserved for
binding to outputs, defined by <p:param type="output"/>

- While you certainly can use the xforms-input processor by hand, it
is not recommended. The Web App controller does most of the work for
you. See the documentation here:

http://www.orbeon.com/oxf/doc/processors-controller#N101B9

The following entry in the controller.xml creates a pipeline that
fills in the form for you and pass it to your pipeline, via the
class-schedule input parameter.

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

- You don't need to specify the content-type in the XML serializer
configuration, since it is the default. An empty <config/> element
works just as well.

Here is a modified XPL that should work for you:

<?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="CourseCatalog">
                     <ScheduleOfClasses>
                         <xsl:apply-templates/>
                     </ScheduleOfClasses>
                 </xsl:template>
                 <xsl:template match="Courses">
                     <Courses>
                         <xsl:apply-templates/>
                     </Courses>
                 </xsl:template>
                 <xsl:template match="Course">
                     <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>

Please let me know if I can be of further help.

Julien Mercay
Orbeon Inc.



Reply via email to