Hi,
I am beginning to shift my app from OPS 2.8 to 3.0beta2 and have a couple of questions relating to my test page: <page id="resolve" path-info="/resolve" model="query/resolve.xpl" view="query/resolve-view.xsl"/> The xforms:model is very simple: <xforms:model> <xforms:instance id="form"> <form> <identifier/> <document/> </form> </xforms:instance> <xforms:submission id="main" replace="instance" method="post" action="/resolve"/> </xforms:model> and in the resolve-view.xsl, there is an input box and a submit button: <xforms:input ref="identifier"/> <xforms:submit submission="main"> <xforms:label>Resolve</xforms:label> </xforms:submit> The model query/resolve.xpl is set up so that it tests the value of /form/identifier in the instance document and if it is null, it does nothing but if it has a value (which it will do after the submit button is hit), it pulls the corresponding document from a db and puts it into /form/document. (1) The view should display /form/document/* which will be an XML document: how can I get this happen? Doing <xforms:output ref="/form/document"/> gives nothing and if I use <f:xml-source><xsl:copy-of select="..."/></f:xml-source> which is what I really want, I don't know what the select should refer to. (2) <f:xml-source> seems to miss the line return at the end of XML lines (3) How can I disable the loading icon at the top of the page? Cheers, Matthew -- 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 |
On Sat, 10 Sep 2005 08:31:09 -0600, "Matthew Graham" <mjg ...> said: > > (1) The view should display /form/document/* which will be an XML > document: how can I get this happen? Doing <xforms:output > ref="/form/document"/> gives nothing and if I use > <f:xml-source><xsl:copy-of select="..."/></f:xml-source> > which is what I really want, I don't know what the select should refer > to. Are you sure the the document is available under /form/document? That is, if you put a debug attrib in the epilogue.xpl on the instance do you see your doc? Btw by 'put a debug attrib' I mean if you replace <p:param type="input" name="instance"/> with <p:param debug="epi-instance" type="input" name="instance"/> in epilogue.xpl. Also I checked the xforms spec and xslt specs. I don't think xforms:output is what you want. What you get is the result of atomization of the ref or value. That said, I think the upload example does what you want. Take look at main-view.xsl. Search for doc( 'input:instance' ). > > (2) <f:xml-source> seems to miss the line return at the end of XML lines Logged a bug, http://forge.objectweb.org/tracker/index.php?func=detail&aid=304058&group_id=168&atid=350207 > (3) How can I disable the loading icon at the top of the page? > Not sure. However it looks like the relevant files are xforms.js, xforms-to-ajax.xsl, and theme.xsl. -- Regards, Dan S -- http://www.fastmail.fm - Email service worth paying for. Try it for free -- 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 |
Hi,
Firstly I have updated to using: Orbeon PresentationServer 3.0.beta3.200509121439 Putting the debug attribute into epilogue.xml reveals that with: <xforms:submission id="main" method="post" replace="instance" action="/resolve"/> in my xforms model, the instance document is not being replaced. However, if I remove the replace="instance" then I can pick up the retrieved XML document as the model and display it with: <f:xml-source> <xsl:copy-of select="/form/document"/> </f:xml-source> Is replace="instance" supposed to be working? Cheers, Matthew [hidden email] wrote: >On Sat, 10 Sep 2005 08:31:09 -0600, "Matthew Graham" ><mjg ...> said: > > >>(1) The view should display /form/document/* which will be an XML >>document: how can I get this happen? Doing <xforms:output >>ref="/form/document"/> gives nothing and if I use >><f:xml-source><xsl:copy-of select="..."/></f:xml-source> >>which is what I really want, I don't know what the select should refer >>to. >> >> > >Are you sure the the document is available under /form/document? That >is, if you put a debug attrib in the epilogue.xpl on the instance do >you see your doc? > >Btw by 'put a debug attrib' I mean if you replace > <p:param type="input" name="instance"/> >with > <p:param debug="epi-instance" type="input" name="instance"/> >in epilogue.xpl. > >Also I checked the xforms spec and xslt specs. I don't think >xforms:output is what you want. What you get is the result of >atomization >of the ref or value. > >That said, I think the upload example does what you want. Take look >at main-view.xsl. Search for doc( 'input:instance' ). > > -- 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 |
On Mon, 12 Sep 2005 09:11:36 -0600, "Matthew Graham" <[hidden email]> said: > Hi, > > Firstly I have updated to using: Orbeon PresentationServer > 3..beta3.200509121439 Putting the debug attribute into epilogue.xml > reveals that with: > > <xforms:submission id="main" method="post" replace="instance" > action="/resolve"/> > > in my xforms model, the instance document is not being replaced. > However, if I remove the replace="instance" then I can pick up the > retrieved XML document as the model and display it with: > > <f:xml-source> <xsl:copy-of select="/form/document"/> </f:xml-source> > > Is replace="instance" supposed to be working? unfortunately he isn't available at the moment. However I do see this note in the release notes "3. Known Limitations of OPS 3.0 The following limitations are known: XForms upload controls only work within forms that are submitted with a reference to a submission element with replace="all". The value of XForms upload controls is ignored when forms are submitted with replace="instance" or replace="none"." -- Regards, Dan S -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow -- 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 |
[hidden email] wrote:
>On Mon, 12 Sep 2005 09:11:36 -0600, "Matthew Graham" ><[hidden email]> said: > > >>Hi, >> >>Firstly I have updated to using: Orbeon PresentationServer >>3..beta3.200509121439 Putting the debug attribute into epilogue.xml >> reveals that with: >> >><xforms:submission id="main" method="post" replace="instance" >>action="/resolve"/> >> >>in my xforms model, the instance document is not being replaced. >>However, if I remove the replace="instance" then I can pick up the >>retrieved XML document as the model and display it with: >> >><f:xml-source> <xsl:copy-of select="/form/document"/> </f:xml-source> >> >>Is replace="instance" supposed to be working? >> >> > >To be honest, I don't know. I know Erik was working on this and >unfortunately he isn't available at the moment. However I do see >this note in the release notes > >"3. Known Limitations of OPS 3.0 > > The following limitations are known: > > XForms upload controls only work within forms that are submitted with a > reference to a submission element with replace="all". The value of > XForms upload controls is ignored when forms are submitted with > replace="instance" or replace="none"." > >-- Regards, Dan S > > > >------------------------------------------------------------------------ > > >-- >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 > > I had read that but it says that it is only pertinent for upload controls: elsewhere it says that replace=instance,all and none are all supported in 3.0. In my page-flow.xml, what is the value of the transform attribute that I now have to use if I want to retain using the xupdate processor: <result page="standardresults" transform="oxf:???"> <xu:update select="/form/results"> ... Cheers, Matthew -- 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 |
On Mon, 12 Sep 2005 15:35:19 -0600, "Matthew Graham" > In my page-flow.xml, what is the value of the transform attribute that I > now have to use if I want to retain using the xupdate processor: > > <result page="standardresults" transform="oxf:???"> > <xu:update select="/form/results"> > ... Well looking at the code, it seems that if you omit the transform attribute or use 'oxf:xupdate' you will get the xupdate processor. However as the doc says support is deprecated. In fact I believe that is why only oxf:xslt and oxf:xquery are mentioned as values for the transform attribute. -- Dan S -- http://www.fastmail.fm - The professional email service -- 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 |
Administrator
|
In reply to this post by mjgraham
Matthew Graham wrote:
> Hi, > > Firstly I have updated to using: Orbeon PresentationServer > 3.0.beta3.200509121439 > Putting the debug attribute into epilogue.xml reveals that with: > > <xforms:submission id="main" method="post" replace="instance" > action="/resolve"/> > > in my xforms model, the instance document is not being replaced. > However, if I remove the replace="instance" then I can pick up the > retrieved XML document as the model and display it with: > > <f:xml-source> > <xsl:copy-of select="/form/document"/> > </f:xml-source> > > Is replace="instance" supposed to be working? mechanism which allows the XForms engine to call an XML service. The "isntance" attribute is also supported, which allows you to specify what XForms instance must hold the result. -Erik -- 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 |
Administrator
|
In reply to this post by mjgraham
Matthew Graham wrote:
> Hi, > > I am beginning to shift my app from OPS 2.8 to 3.0beta2 and have a > couple of questions relating to my test page: > > <page id="resolve" path-info="/resolve" model="query/resolve.xpl" > view="query/resolve-view.xsl"/> > > The xforms:model is very simple: > > <xforms:model> > <xforms:instance id="form"> > <form> > <identifier/> > <document/> > </form> > </xforms:instance> > <xforms:submission id="main" replace="instance" method="post" > action="/resolve"/> > </xforms:model> > > and in the resolve-view.xsl, there is an input box and a submit button: > > <xforms:input ref="identifier"/> > <xforms:submit submission="main"> > <xforms:label>Resolve</xforms:label> > </xforms:submit> > > The model query/resolve.xpl is set up so that it tests the value of > /form/identifier in the instance document and if it is null, it does > nothing but if it has a value (which it will do after the submit button > is hit), it pulls the corresponding document from a db and puts it into > /form/document. > > (1) The view should display /form/document/* which will be an XML > document: how can I get this happen? Doing <xforms:output > ref="/form/document"/> gives nothing and if I use > <f:xml-source><xsl:copy-of select="..."/></f:xml-source> > which is what I really want, I don't know what the select should refer to. If you are going to use replace="instance", you should be aware of how this is supposed to work: 1. The XForms engine submits an XForms instance as a POST of an XML document to the URL specified in the "action" attribute. 2. Some server-side code must react to that submission, do some processing, and then return an XML document as a result. Step #1 is done as you have shown above. Step #2, with OPS, is very convenient to do: just create a <page> entry in the PFC, for example: <page path-info="/xforms-controls/save"/> <action action="my-action.xpl"/> </page> my-action.xpl receives automatically the submitted XML document on its "instance" input. To produce the resulting XML document, you have two options: 1. Use the XML converter + HTTP serializer manually in my-action.xpl 2. Use a page view to generate the resulting XML. The epilogue will take care of serialization to the web browser as XML if it finds out that the page view does not produces XHTML, HTML, or XSL-FO. In the latter case, your <page> element would look like: <page path-info="/xforms-controls/save" view="my-view.xpl"/> <action action="my-action.xpl"/> </page> The reason to use a separate <page> element is that what you are really accomplishing here is implementing an XML service, i.e. a service which receives XML and which produces XML in return. In theory, those services are completely independent from the initial page which calls them. Now it is not impossible to keep using a single <page> element as you are doing, both to generate the initial XHTML + XForms page and then to implement services, but it does not make the page flow look clearer and does not bring any benefit I believe. > (2) <f:xml-source> seems to miss the line return at the end of XML lines The XML formatting code will... reformat your XML, possibly in ways you don't quite expect. Do you have a specific and clear example of unintended behavior? The formatting code is BTW available under xml-formatting.xsl. > (3) How can I disable the loading icon at the top of the page? In theme.xsl, you will find this: <xsl:template match="xhtml:span[@class = 'xforms-loading-loading']"> <xsl:copy> <xsl:apply-templates select="@*"/> <xhtml:img src="/images/loading.gif" style="float: left"/> Loading... </xsl:copy> </xsl:template> Simply modify this template as you wish. -Erik -- 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 |
Administrator
|
In reply to this post by mjgraham
Matthew Graham wrote:
>> "3. Known Limitations of OPS 3.0 >> >> The following limitations are known: >> >> XForms upload controls only work within forms that are submitted with a >> reference to a submission element with replace="all". The value of >> XForms upload controls is ignored when forms are submitted with >> replace="instance" or replace="none"." > I had read that but it says that it is only pertinent for upload > controls: elsewhere it says that replace=instance,all and none are all > supported in 3.0. Correct. > In my page-flow.xml, what is the value of the transform attribute that I > now have to use if I want to retain using the xupdate processor: > > <result page="standardresults" transform="oxf:???"> > <xu:update select="/form/results"> > ... oxf:xupdate will work, or you can simply not use the transform attribute and things will work as with 2.8. -Erik -- 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 |
Free forum by Nabble | Edit this page |