Thanks so much for your prompt help. My last problem is now solved. I am afraid that I am still having trouble though, and am hoping that somebody can point out any obvious errors in the following xpl file. The uri that my form submits to is mapped to an xpl file, in which I would like to take the submitted form data, translate it to xml using the xforms input processor, apply a stylesheet to that document which will merge it with another xml document, and return the output to the client as xml. I have played around with an xpl file a lot and tried to follow the examples, but I can't get anything but the 'blank' page with the copyright notice. The xpl file is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline";>
<p:processor uri="oxf/processor/request">
<p:input name="config">
<!-- this seems to be how one gets request data into the pipeline -->
<config>
<include>/request/request-uri</include>
</config>
</p:input>
<p:output name="data" id="request"/>
</p:processor>
<!-- need an xforms input processor component here, but not sure how to do this -->
<p:processor uri="oxf/processor/xforms-input">
<p:input name="data" ref="request"/>
<p:output name="data" id="class-schedule"/>
</p:processor>
<p:processor uri="oxf/processor/xslt">
<!--<p:input name="config" href="Merge.xsl"/>-->
<p:input name="config">
<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>
</config>
</p:input>
<!--<p:input name="data" href="#request" schema-href="ClassSchedules.dtd"/>-->
<p:input name="data" ref="class-schedule"/>
<p:output name="data" id="scheduled-course"/>
</p:processor>
<p:processor uri="oxf/processor/xml-serializer">
<p:input name="config">
<config>
<content-type>text/xml</content-type>
</config>
</p:input>
<!--<p:input name="data" href="#scheduled-course"/>-->
<p:input name="data" ref="scheduled-course"/>
</p:processor>
</p:config>


And the mapping in the controller file is as follows: <page path-info="/hello/createClass" model="oxf:/hello/CreateScheduledCourse.xpl"/>

Any help would be greatly appreciated, and thanks again for the wonderful help I've already received.

regards,

calvin



Erik Bruchez wrote:

Hi Calvin,

XForms unfortunately requires setting the action in the model (in
xforms:submission). For now, to get a single form to submit to
different URLs, you have at least the following options:

1. Dynamically generate the model, for example from XSLT. There, you
   can set any action you want. Instead of using a static XML file
   with the XForms model, generate the model dynamically from a
   pipeline. For example, setup the following in a pipeline:

<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="#blah"/>
<p:input name="config">
<xsl:stylesheet version="1.0">
<xsl:template match="/">
<xforms:model schema="oxf:/form/forecast-id.rng">
<xforms:submission method="get" action="{/my/custom/action}"/>
<xforms:instance>
...


2. Post-process with XSLT the <form action=""> generated by the XForms
   Output processor.

We've been thinking about adding special attributes (in a special
namespace) to the xforms elements to address that kind of issues
better.

I hope this helps,

-Erik

Calvin Smith wrote:
> Thanks for the helpful reply to my former question. Using xforms:caption
> instead of xforms:label solved the problem I was having, and I have the
> logger configured properly now.
>
> I have another question that I am hoping somebody can help me with. I need
> to customize the output of the xforms processor so that the html form that
> is output will post to a different URL. I have not been able to find the
> transform that is responsible for translating the xform into an html form,
> so the current output is just a form with no action or method attribute. I
> didn't see anything about customizing the output of the xforms processor
> in the xforms documentation, but I assume that there must be
> a way to get the output form to post to a different URL -- perhaps
> something I could add to my stylesheet, or a transform that I could alter.
>
> thanks,
>
> calvin
>
> --
> Calvin Smith
> Graduate Student Researcher
> School of Information Management and Systems
> University of California, Berkeley
> http://www.sims.berkeley.edu/~calvins/





Reply via email to