how to use pdf-template --> xforms ng

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to use pdf-template --> xforms ng

c.harder
I have a little project with input(xforms:input), validation(xforms:bind) and 3 different outputs (xforms:output, xml-detail-model.xpl, pdf-detail-model.xpl).

I've changed the pdf-detail-model.xpl of the pdf-template example, but it's not working correctly. I am getting the original template.pdf without any entries of input.

This project uses the new xforms-engine, so there is no xforms attribute in the page-flow.xml. I've tried an example without ng --> it's working correctly!

So where I have to make changes. Is there something wrong with my detail.xpl, page-flow.xml or is that problem based on oxf:pdf-template?

Please have a look at the code:
--------------------------------
pdf-detail-model.xpl
<p:config
  xmlns:p="http://www.orbeon.com/oxf/pipeline"
  xmlns:oxf="http://www.orbeon.com/oxf/processors">
  <p:param
    name="instance"
    type="input" />
  <p:processor name="oxf:pdf-template">
    <p:input
      name="instance"
      href="#instance#xpointer(/*)" />
    <p:input name="model">
      <config>
        <template href="oxf:/dvz/example.pdf" />
        <field
          left-position="108.5"
          top-position="138"
          spacing="15.9"
          font-family="Courier"
          font-size="14"
          size="20"
          ref="/myform/first-name" />
      </config>
    </p:input>
    <p:input name="config">
      <config />
    </p:input>
    <p:output
      name="data"
      id="out" />
  </p:processor>
  <p:processor name="oxf:http-serializer">
    <p:input
      name="data"
      href="#out" />
    <p:input name="config">
      <config>
        <header>
          <name>Content-Disposition</name>
          <value>attachment; filename=document.pdf</value>
        </header>
      </config>
    </p:input>
  </p:processor>
</p:config>
-----------------------------
page-flow.xml
....
 <page
    path-info="/dvz/hundesteuer/anmeldung"
    default-submission="initial-instance.xml"
    view="eingabe-view.xml">

    <action when="/anmeldung/action = 'pdf-detail'">
      <result
        page="pdf-detail"
        transform="oxf:xslt">
        <myform xsl:version="2.0">
            <xsl:copy-of select="doc('input:instance')/myform/*" />
        </myform>
      </result>
    </action>
  </page>
  <page
    id="pdf-detail"
    path-info="/dvz/pdf-detail"
    model="pdf-detail/pdf-detail-model.xpl" />
.....



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: how to use pdf-template --> xforms ng

c.harder
Sorry! ;-)
The last part of code was wrong

page-flow.xml
....
<page
path-info="/dvz"
default-submission="initial-instance.xml"
view="input-view.xhtml">

<action when="/myform/action = 'pdf-detail'">
<result
page="pdf-detail"
transform="oxf:xslt">
<myform xsl:version="2.0">
<xsl:copy-of select="doc('input:instance')/myform/*" />
</myform>
</result>
</action>
</page>
<page
id="pdf-detail"
path-info="/dvz/pdf-detail"
model="pdf-detail/pdf-detail-model.xpl" />



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: how to use pdf-template --> xforms ng

c.harder
Ok! I don't know why, but now everything works fine. It's kind of magic! ;-) I think there was a little mistake, which I've corrected without getting notice of it.
Sorry for taking your time for nothing.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws