Administrator
|
Nico,
This seems to point out to a problem with the synchronization of the CVS repository for the saxon module. All the changes shown by viewcvs are very old, and clearly we have upgraded the source code to Saxon since then. This is puzzling. -Erik Nicolas Modrzyk wrote: > Hi Erik, > > I wish I would know why I am getting those errors. :) > > Thing is: > http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/ops/orbeon/src/java/org/orbeon/oxf/processor/transformer/xslt/XSLTTransformer.java?rev=1.41&only_with_tag=HEAD&content-type=text/vnd.viewcvs-markup > > is definitely using ContentHandlerProxyLocator > > and that class is not in: > http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/ops/saxon/org/orbeon/saxon/event/?only_with_tag=HEAD > > So I am definitely thinking I got the CVS paths wrong. > > Anyway, I fixed my problem by reverse engineering the > saxon-8_8_orbeon_20070817.jar file > > Niko, > > On 10/18/07, Erik Bruchez <[hidden email]> wrote: >> Nikolas, >> >> I am not sure why you are getting these errors. It seems that everything >> is committed now. What JDK are you using to compile? >> >> -Erik >> >> Nicolas Modrzyk wrote: >>> Hi Erik, >>> >>> Thanks for the followup!! >>> >>> I have less mismatches (^ ^)/ >>> I am attaching the remaining ones I have. >>> >>> Thank you again for your time and help, >>> >>> Niko, >>> >>> >>> >>> On 10/17/07, Erik Bruchez <[hidden email]> wrote: >>>> Nicolas, >>>> >>>> It seems that I had a few changes to Saxon that I hadn't committed. >>>> That's done now. Please update from CVS and let us know if that fixes >>>> the build! >>>> >>>> Thanks, >>>> >>>> -Erik >>>> >>>> Nicolas Modrzyk wrote: >>>>> hello hello, >>>>> >>>>> I will try to reformulate my question. >>>>> >>>>> If I use the orbeon-saxon jar file that is in the lib folder, I can >>>>> compile the orbeon code properly, and create the orbeon war file. >>>>> >>>>> If I create a new orbeon-saxon.jar file from the code (CVS HEAD - >>>>> saxon module), I get a new orbeon-saxon jar file. >>>>> If I include that jar file into the orbeon lib folder, then the >>>>> orbeon code doesn't compile properly anymore. >>>>> >>>>> So it'd be nice if I could find the matching code so I can compile >>>>> both the saxon-orbeon jar file, and the orbeon war file properly. >>>>> >>>>> I would love to be able to get the code before the objectweb forge >>>>> goes down tomorrow. >>>>> >>>>> Thank you for any pointers, >>>>> >>>>> Niko, >>>>> >>>>> On 10/16/07, Nicolas Modrzyk <[hidden email]> wrote: >>>>>> Hi Erik, >>>>>> >>>>>> Thank you for your support! >>>>>> >>>>>> The exception message I am seeing is: >>>>>> >>>>>> org.orbeon.saxon.dom.DOMWriter#namespace ():118 >>>>>> org.orbeon.saxon.event.NamespaceReducer#namespace():97 >>>>>> org.orbeon.saxon.event.NamespaceReducer#startElement():85 >>>>>> org.orbeon.saxon.event.ReceivingContentHandler#startElement():217 >>>>>> >>>>>> So I am trying to go to that specific class in the code. >>>>>> I indeed checked out the code in the saxon module in cvs but it seems >>>>>> to be out of sync with the current ops trunk ? >>>>>> >>>>>> For example, I get the following error: >>>>>> The import org.orbeon.saxon.event.ContentHandlerProxyLocator cannot be >>>>>> resolved in orbeon/src/java/org/orbeon/oxf/processor/transformer/xslt XSLTTransformer.java >>>>>> >>>>>> And indeed it is not in the current cvs code. >>>>>> Is there a specific CVS tag I should use ? >>>>>> >>>>>> Niko, >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On 10/16/07, Erik Bruchez <[hidden email]> wrote: >>>>>>> Nicolas, >>>>>>> >>>>>>> The Schema validation improvements we did for XForms do not use Xerces >>>>>>> at all, so I doubt those can explain the issue you are seeing. For >>>>>>> XForms, we use MSV. >>>>>>> >>>>>>> Also, the version of Saxon we are using does not have any XML Schema >>>>>>> support besides simple types. Saxon comes in two versions: one basic and >>>>>>> one schema-aware. The latter is commercial. >>>>>>> >>>>>>> -Erik >>>>>>> >>>>>>> Nicolas Modrzyk wrote: >>>>>>>> So I've nailed this down to my problem being related to: >>>>>>>> >>>>>>>> http://www.orbeon.com/ops/doc/home-changes-36#d6e50 >>>>>>>> >>>>>>>> where it says improved schema validation: >>>>>>>> >>>>>>>> That seems to have an impact on some of the xpl code I have: >>>>>>>> >>>>>>>> <xsl:template match="/"> >>>>>>>> <xsl:copy> >>>>>>>> <delegation:execute service="TMS_WS" >>>>>>>> operation="setOutput" xsl:version="2.0"> >>>>>>>> <tms:taskId> >>>>>>>> <xsl:value-of select="/*: output/@taskId"/> >>>>>>>> </tms:taskId> >>>>>>>> <tms:data> >>>>>>>> <xsl:apply-templates select="*"/> >>>>>>>> </tms:data> >>>>>>>> <tms:participantToken> >>>>>>>> <xsl:value-of >>>>>>>> select="/*:output/@participantToken"/> >>>>>>>> </tms:participantToken> >>>>>>>> </delegation:execute> >>>>>>>> </xsl:copy> >>>>>>>> </xsl:template> >>>>>>>> >>>>>>>> >>>>>>>> Copy chokes on the xsl:copy with that Namespace exception coming from xerces. >>>>>>>> >>>>>>>> The root of the cause is that <tms:data> should contain an xml frament >>>>>>>> that defines a root space for itself. So the namespace for that >>>>>>>> frament starts with: >>>>>>>> >>>>>>>> <output xmlns="http://www.example.com/MyRequestRequest" ... > >>>>>>>> >>>>>>>> It looks like the updated version of Saxon is forcing more schema >>>>>>>> compliance, in regards to the XSTL2.0 specifications. >>>>>>>> >>>>>>>> Any ideas or comments you could have on this ? >>>>>>>> So many emails, but really hope to get this moving forward. >>>>>>>> >>>>>>>> Nicolas, >>>>>>>> >>>>>>>> >>>>>>>> On 10/15/07, Nicolas Modrzyk <[hidden email]> wrote: >>>>>>>>> Sorry. My pevious question was misleading. The xerces-impl-orbeon jar file was in the private folder. >>>>>>>>> >>>>>>>>> >>>>>>>>> Is there a way to see the diff made on that xerces jar somewhere ? >>>>>>>>> The forms I had were working before and they don't since I updated to the new code. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Thank you in advance, >>>>>>>>> >>>>>>>>> Niko, >>>>>>>>> >>>>>>>>> >>>>>>> -- >>>>>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>>>>>> http://www.orbeon.com/ >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> 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 >>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>>>>> >>>>>>> >>>>>> ------------------------------------------------------------------------ >>>>>> >>>> -- >>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>>> http://www.orbeon.com/ >>>> >>>> >>>> -- >>>> 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 >>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>> >>>> >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.com/ >> >> >> -- >> 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 >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Erik Bruchez
I am trying to save the agent-instance back to the file where it was originally read in. The original document is in apps/sifzones/viewzones.xhtml In the document <head> I have this <xforms:model > <xforms:submission ref="instance('agent-instance')" id="save-submission" method="post" action="oxf:../sifshared/save.xpl" replace="instance" instance="agent-instance"> <xforms:message ev:event="xforms-submit-error" level="modal">An error occurred while saving!</xforms:message> </xforms:submission> </xforms:model> in the body <xforms:submit submission="save-submission" appearance="minimal"> <xforms:label><xhtml:img src="../apps/sifshared/images/save.gif" alt="Save"/> Save</xforms:label> </xforms:submit> In the apps/sifshared/save.xpl file is <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <p:param name="instance" type="input"/> <p:param name="data" type="output"/> <!-- Convert a document to serialized XML --> <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <encoding>utf-8</encoding> </config> </p:input> <p:input name="data" href="/config/config.xml"/> <p:output name="data" id="converted"/> </p:processor> <!-- Write the document to a file --> <p:processor name="oxf:file-serializer"> <p:input name="config"> <config> <directory>/sifshared/</directory> <file>config.xml</file> <make-directories>true</make-directories> <append>false</append> </config> </p:input> <p:input name="data" href="#converted"/> </p:processor> </p:config> I'm not even sure the save.xpl file is being located and if so what the error with it is. Any help in turning on debugging or fixing up the code would be appreciated.
Yes, that will work. You can call the oxf:file-serializer from XPL, and then you need to hook-up XPL to XForms, either by using the xxforms:call-xpl() XPath extension function or by using an XForms submission. In theory, file: and oxf: URLs should be supported by XForms submission in Orbeon Forms, but at the moment we don't support that. If somebody feels like fixing this, you are welcome! This would involve changes to XFormsModelSubmission.java. -Erik Hank Ratzesberger wrote: > > George, > > I think what you want is the file-serializer: > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > This pipeline will write the xml to a file, also keep it cached if > you expect to re-read it. > > --Hank > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > <mailto:[hidden email]> wrote: > >> >> I am new to the list and was not successful in searching the archives >> for this issue. I am writing a web app to edit a Java properties file >> that is part of a Java application. The app reads the XML >> configuration file when starting, edits and adding items works but I >> can't write the xml file back to its original location on the server. >> I can write to and read from the exists database. Is there any way to >> write the XML on the server? >> >> -- >> You receive this message as a subscriber of the [hidden email] >> <mailto:[hidden email]> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws > > Hank Ratzesberger > NEES@UCSB > Institute for Crustal Studies, > University of California, Santa Barbara > 805-893-8042 > > > > > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
First off, it looks like the problem is from where you are triggering your submission. Try putting this in your body instead:
<xforms:trigger>
<xforms:label>
<xhtml:img src="="../apps/sifshared/images/save.gif" alt="Save"/>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:send submission="save-submission"/>
</xforms:action>
</xforms:trigger>
Note: If you are doing only one action off the DOMActivate, then the xforms:action element isn't technically needed. Just move the ev:event down to the send element. Second, I'm not sure if Orbeon Forms allows oxf:// url's in the action attribute or not. (I'm sure it does, but I never do it that way)
The standard way to do it is to have your action point to a URL relative to the base of your application. Then, in your PFC, wire a handler for that URL to call your pipeline.
Daniel E. Renfer
On 10/29/07, [hidden email] <[hidden email]> wrote:
-- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Daniel Renfer wrote:
> Second, I'm not sure if Orbeon Forms allows oxf:// url's in the action > attribute or not. (I'm sure it does, but I never do it that way) It does half: it works only for reading, not writing. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by Daniel E. Renfer
Daniel Renfer wrote:
> First off, it looks like the problem is from where you are triggering > your submission. Try putting this in your body instead: > > <xforms:trigger> > <xforms:label> > <xhtml:img src="="../apps/sifshared/images/save.gif" alt="Save"/> > </xforms:label> > <xforms:action ev:event="DOMActivate"> > <xforms:send submission="save-submission"/> > </xforms:action> > </xforms:trigger> -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by GEORGE.ADAMS
George,
You can't call an XPL file through xforms:submission/@action. At best, this would overwrite the file save.xpl, but this won't work as we don't support writing to files from xforms:submission. If you want to call an XPL from XForms, you can either: * Declare a service in your page flow, and call the URL of that service from XForms. * Use the extension XPath function xxforms:call-xpl() from an XForms action. -Erik [hidden email] wrote: > > I am trying to save the agent-instance back to the file where it was > originally read in. > > The original document is in apps/sifzones/viewzones.xhtml > In the document <head> I have this > > <xforms:model > > <xforms:submission ref="instance('agent-instance')" id="save-submission" > method="post" action="oxf:../sifshared/save.xpl" replace="instance" > instance="agent-instance"> > <xforms:message ev:event="xforms-submit-error" level="modal">An > error occurred while saving!</xforms:message> > </xforms:submission> > </xforms:model> > > in the body > <xforms:submit submission="save-submission" appearance="minimal"> > <xforms:label><xhtml:img src="../apps/sifshared/images/save.gif" > alt="Save"/> Save</xforms:label> > </xforms:submit> > > > > In the apps/sifshared/save.xpl file is > > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > <!-- Convert a document to serialized XML --> > <p:processor name="oxf:xml-converter"> > <p:input name="config"> > <config> > <encoding>utf-8</encoding> > </config> > </p:input> > <p:input name="data" href="/config/config.xml"/> > <p:output name="data" id="converted"/> > </p:processor> > <!-- Write the document to a file --> > <p:processor name="oxf:file-serializer"> > <p:input name="config"> > <config> > <directory>/sifshared/</directory> > <file>config.xml</file> > <make-directories>true</make-directories> > <append>false</append> > </config> > </p:input> > <p:input name="data" href="#converted"/> > </p:processor> > </p:config> > > I'm not even sure the save.xpl file is being located and if so what the > error with it is. > Any help in turning on debugging or fixing up the code would be > appreciated. > > > *Erik Bruchez <[hidden email]>* > Sent by: Erik Bruchez <[hidden email]> > > 10/16/07 12:48 PM > Please respond to > [hidden email] > > > > To > [hidden email] > cc > > Subject > Re: [ops-users] Saving XML file on server > > > > > > > > > Yes, that will work. You can call the oxf:file-serializer from XPL, and > then you need to hook-up XPL to XForms, either by using the > xxforms:call-xpl() XPath extension function or by using an XForms > submission. > > In theory, file: and oxf: URLs should be supported by XForms submission > in Orbeon Forms, but at the moment we don't support that. If somebody > feels like fixing this, you are welcome! This would involve changes to > XFormsModelSubmission.java. > > -Erik > > Hank Ratzesberger wrote: > > > > George, > > > > I think what you want is the file-serializer: > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > This pipeline will write the xml to a file, also keep it cached if > > you expect to re-read it. > > > > --Hank > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > <mailto:[hidden email]> wrote: > > > >> > >> I am new to the list and was not successful in searching the archives > >> for this issue. I am writing a web app to edit a Java properties file > >> that is part of a Java application. The app reads the XML > >> configuration file when starting, edits and adding items works but I > >> can't write the xml file back to its original location on the server. > >> I can write to and read from the exists database. Is there any way to > >> write the XML on the server? > >> > >> -- > >> You receive this message as a subscriber of the [hidden email] > >> <mailto:[hidden email]> mailing list. > >> To unsubscribe: mailto:[hidden email] > >> For general help: mailto:[hidden email]?subject=help > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > Hank Ratzesberger > > NEES@UCSB > > Institute for Crustal Studies, > > University of California, Santa Barbara > > 805-893-8042 > > > > > > > > > > > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
All these answers are just getting me more confused. I'll take another look at the example forms and documentation and see it all makes more sense. George Adams Educational Technology / Integration Services 651 603-4891
George, You can't call an XPL file through xforms:submission/@action. At best, this would overwrite the file save.xpl, but this won't work as we don't support writing to files from xforms:submission. If you want to call an XPL from XForms, you can either: * Declare a service in your page flow, and call the URL of that service from XForms. * Use the extension XPath function xxforms:call-xpl() from an XForms action. -Erik [hidden email] wrote: > > I am trying to save the agent-instance back to the file where it was > originally read in. > > The original document is in apps/sifzones/viewzones.xhtml > In the document <head> I have this > > <xforms:model > > <xforms:submission ref="instance('agent-instance')" id="save-submission" > method="post" action="oxf:../sifshared/save.xpl" replace="instance" > instance="agent-instance"> > <xforms:message ev:event="xforms-submit-error" level="modal">An > error occurred while saving!</xforms:message> > </xforms:submission> > </xforms:model> > > in the body > <xforms:submit submission="save-submission" appearance="minimal"> > <xforms:label><xhtml:img src="../apps/sifshared/images/save.gif" > alt="Save"/> Save</xforms:label> > </xforms:submit> > > > > In the apps/sifshared/save.xpl file is > > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > <!-- Convert a document to serialized XML --> > <p:processor name="oxf:xml-converter"> > <p:input name="config"> > <config> > <encoding>utf-8</encoding> > </config> > </p:input> > <p:input name="data" href="/config/config.xml"/> > <p:output name="data" id="converted"/> > </p:processor> > <!-- Write the document to a file --> > <p:processor name="oxf:file-serializer"> > <p:input name="config"> > <config> > <directory>/sifshared/</directory> > <file>config.xml</file> > <make-directories>true</make-directories> > <append>false</append> > </config> > </p:input> > <p:input name="data" href="#converted"/> > </p:processor> > </p:config> > > I'm not even sure the save.xpl file is being located and if so what the > error with it is. > Any help in turning on debugging or fixing up the code would be > appreciated. > > > *Erik Bruchez <[hidden email]>* > Sent by: Erik Bruchez <[hidden email]> > > 10/16/07 12:48 PM > Please respond to > [hidden email] > > > > To > [hidden email] > cc > > Subject > Re: [ops-users] Saving XML file on server > > > > > > > > > Yes, that will work. You can call the oxf:file-serializer from XPL, and > then you need to hook-up XPL to XForms, either by using the > xxforms:call-xpl() XPath extension function or by using an XForms > submission. > > In theory, file: and oxf: URLs should be supported by XForms submission > in Orbeon Forms, but at the moment we don't support that. If somebody > feels like fixing this, you are welcome! This would involve changes to > XFormsModelSubmission.java. > > -Erik > > Hank Ratzesberger wrote: > > > > George, > > > > I think what you want is the file-serializer: > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > This pipeline will write the xml to a file, also keep it cached if > > you expect to re-read it. > > > > --Hank > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > <mailto:[hidden email]> wrote: > > > >> > >> I am new to the list and was not successful in searching the archives > >> for this issue. I am writing a web app to edit a Java properties file > >> that is part of a Java application. The app reads the XML > >> configuration file when starting, edits and adding items works but I > >> can't write the xml file back to its original location on the server. > >> I can write to and read from the exists database. Is there any way to > >> write the XML on the server? > >> > >> -- > >> You receive this message as a subscriber of the [hidden email] > >> <mailto:[hidden email]> mailing list. > >> To unsubscribe: mailto:[hidden email] > >> For general help: mailto:[hidden email]?subject=help > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > Hank Ratzesberger > > NEES@UCSB > > Institute for Crustal Studies, > > University of California, Santa Barbara > > 805-893-8042 > > > > > > > > > > > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by GEORGE.ADAMS
I downloaded the OPS Eclipse plug-in but it seems to be for version 2. I tried the 30 day trial of Oxygen but it doesn't handle xpl My preference would be an open source editor or plug-in that will work on a Macintosh or Linux Any suggestions? -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
I use jedit with the XML plugin.
Pretty good, well formed-ness checking, schema validation, tag matching
+ autocompletion, folding etc.
Alternatively the xml editor in Eclipse's Web Tools Platform (WTP) is ok, certainly it's got a lot better. But a pain to use as a general purpose editor if you're not already using Eclipse for your work (have to set up workspace etc). Adrian [hidden email] wrote:
-- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by GEORGE.ADAMS
George,
On 10/29/07, [hidden email] <[hidden email]> wrote: > I downloaded the OPS Eclipse plug-in but it seems to be for version 2. > I tried the 30 day trial of Oxygen but it doesn't handle xpl > My preference would be an open source editor or plug-in that will work on a > Macintosh or Linux > Any suggestions? We have a schema for XPL (as well as XForms, XSLT, and others). So any schema aware XML editor should do. I am using IntelliJ because I also do work in JavaScript and Java, and IntelliJ supports well those languages. If you are already using Eclipse, you might want to just use the XML editor that comes with most distributions of Eclipse (part of WTP). And you can find the schema for XPL in (look for pipeline.xsd): http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/ops/orbeon/src/java/org/orbeon/oxf/xml/schemas/ Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by GEORGE.ADAMS
George,
Ok, so the original issue was that you needed to write a file to disk, right? In theory, you could be able to do this directly from XForms, using something like: xforms:submission/@action="oxf:/..." or xforms:submission/@action="file:/..." I think this is what you tried to do initially. The only reason this doesn't work is that we do not implement write support for oxf: and file: in XForms submissions at the moment. This would be a desirable feature (probably off by default for security reasons). So since this is not implemented, you have to go through some hoops to get here. Instead, what you can do is: 1. Implement the writing to a file in an XPL file, using the oxf:file-serializer or oxf:url-serializer processor. 2. Declare that XPL file as a service in your page flow. 3. Submit your XML document from XForms to that service. -Erik [hidden email] wrote: > > All these answers are just getting me more confused. I'll take another > look at the example forms and documentation and see it all makes more > sense. > > George Adams > Educational Technology / Integration Services > 651 603-4891 > > > *Erik Bruchez <[hidden email]>* > Sent by: Erik Bruchez <[hidden email]> > > 10/29/07 05:47 PM > Please respond to > [hidden email] > > > > To > [hidden email] > cc > > Subject > Re: [ops-users] Saving XML file on server > > > > > > > > > George, > > You can't call an XPL file through xforms:submission/@action. > > At best, this would overwrite the file save.xpl, but this won't work as > we don't support writing to files from xforms:submission. > > If you want to call an XPL from XForms, you can either: > > * Declare a service in your page flow, and call the URL of that service > from XForms. > > * Use the extension XPath function xxforms:call-xpl() from an XForms action. > > -Erik > > [hidden email] wrote: > > > > I am trying to save the agent-instance back to the file where it was > > originally read in. > > > > The original document is in apps/sifzones/viewzones.xhtml > > In the document <head> I have this > > > > <xforms:model > > > <xforms:submission ref="instance('agent-instance')" > id="save-submission" > > method="post" action="oxf:../sifshared/save.xpl" replace="instance" > > instance="agent-instance"> > > <xforms:message ev:event="xforms-submit-error" level="modal">An > > error occurred while saving!</xforms:message> > > </xforms:submission> > > </xforms:model> > > > > in the body > > <xforms:submit submission="save-submission" appearance="minimal"> > > <xforms:label><xhtml:img src="../apps/sifshared/images/save.gif" > > alt="Save"/> Save</xforms:label> > > </xforms:submit> > > > > > > > > In the apps/sifshared/save.xpl file is > > > > > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > > xmlns:oxf="http://www.orbeon.com/oxf/processors" > > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > > > <p:param name="instance" type="input"/> > > <p:param name="data" type="output"/> > > <!-- Convert a document to serialized XML --> > > <p:processor name="oxf:xml-converter"> > > <p:input name="config"> > > <config> > > <encoding>utf-8</encoding> > > </config> > > </p:input> > > <p:input name="data" href="/config/config.xml"/> > > <p:output name="data" id="converted"/> > > </p:processor> > > <!-- Write the document to a file --> > > <p:processor name="oxf:file-serializer"> > > <p:input name="config"> > > <config> > > <directory>/sifshared/</directory> > > <file>config.xml</file> > > <make-directories>true</make-directories> > > <append>false</append> > > </config> > > </p:input> > > <p:input name="data" href="#converted"/> > > </p:processor> > > </p:config> > > > > I'm not even sure the save.xpl file is being located and if so what the > > error with it is. > > Any help in turning on debugging or fixing up the code would be > > appreciated. > > > > > > *Erik Bruchez <[hidden email]>* > > Sent by: Erik Bruchez <[hidden email]> > > > > 10/16/07 12:48 PM > > Please respond to > > [hidden email] > > > > > > > > To > > [hidden email] > > cc > > > > Subject > > Re: [ops-users] Saving XML file on server > > > > > > > > > > > > > > > > > > Yes, that will work. You can call the oxf:file-serializer from XPL, and > > then you need to hook-up XPL to XForms, either by using the > > xxforms:call-xpl() XPath extension function or by using an XForms > > submission. > > > > In theory, file: and oxf: URLs should be supported by XForms submission > > in Orbeon Forms, but at the moment we don't support that. If somebody > > feels like fixing this, you are welcome! This would involve changes to > > XFormsModelSubmission.java. > > > > -Erik > > > > Hank Ratzesberger wrote: > > > > > > George, > > > > > > I think what you want is the file-serializer: > > > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > > > This pipeline will write the xml to a file, also keep it cached if > > > you expect to re-read it. > > > > > > --Hank > > > > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > > <mailto:[hidden email]> wrote: > > > > > >> > > >> I am new to the list and was not successful in searching the archives > > >> for this issue. I am writing a web app to edit a Java properties file > > >> that is part of a Java application. The app reads the XML > > >> configuration file when starting, edits and adding items works but I > > >> can't write the xml file back to its original location on the server. > > >> I can write to and read from the exists database. Is there any way to > > >> write the XML on the server? > > >> > > >> -- > > >> You receive this message as a subscriber of the [hidden email] > > >> <mailto:[hidden email]> mailing list. > > >> To unsubscribe: mailto:[hidden email] > > >> For general help: mailto:[hidden email]?subject=help > > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > Hank Ratzesberger > > > NEES@UCSB > > > Institute for Crustal Studies, > > > University of California, Santa Barbara > > > 805-893-8042 > > > > > > > > > > > > > > > > > > > > > -- > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > > http://www.orbeon.com/ > > > > -- > > 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 > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Erik Bruchez
I am still struggling with getting a file saved back on the server. I have tried the code below and multiple variations of it. I am no longer getting an error stating the save failed but no file is written. The resulting URL is ending up at a page named xforms-server-submit and it displays what looks like the original viewzones.xhtml page but the images are broken so the context is wrong. Any help would be appreciated. I have read the recent posts about debugging but can't find any ops.log files. The starting page is viewzones.xhtml and contains the following code; In the xforms:model <xforms:submission id="save-submission2" method="post" action="."/> or <xforms:submission id="save-submission2" method="post" action="save.xpl"/> In the body <xforms:group> <xforms:trigger> <xforms:label><xhtml:img src="../apps/sifshared/images/save.gif" alt="Save"/>Save</xforms:label> </xforms:trigger> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance">instance('agent-instance')</xforms:setvalue> <xforms:send submission="save-submission2"/> </xforms:action> </xforms:group> -------- save.xpl is as follows <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <p:param name="instance" type="input"/> <p:param name="data" type="output"/> <!-- Convert a document to serialized XML --> <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <encoding>utf-8</encoding> </config> </p:input> <p:input name="instance" /> <p:output name="data" id="converted"/> </p:processor> <!-- Write the document to a file --> <p:processor name="oxf:file-serializer"> <p:input name="config"> <config> <directory>/sifshared/</directory> <file>configTest2.xml</file> <make-directories>true</make-directories> <append>false</append> </config> </p:input> <p:input name="data" href="#converted"/> </p:processor> </p:config> ----------- The page-flow.xml is as follows <config xmlns="http://www.orbeon.com/oxf/controller"> <page path-info="/sifzones/" view="viewzones.xhtml"/> <page id="save-submission2" path-info="/sifzones/save.xpl" view="viewzones.xhtml"> </page> <epilogue url="oxf:/config/epilogue.xpl"/> </config> George Adams Educational Technology / Integration Services 651 603-4891
Yes, that will work. You can call the oxf:file-serializer from XPL, and then you need to hook-up XPL to XForms, either by using the xxforms:call-xpl() XPath extension function or by using an XForms submission. In theory, file: and oxf: URLs should be supported by XForms submission in Orbeon Forms, but at the moment we don't support that. If somebody feels like fixing this, you are welcome! This would involve changes to XFormsModelSubmission.java. -Erik Hank Ratzesberger wrote: > > George, > > I think what you want is the file-serializer: > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > This pipeline will write the xml to a file, also keep it cached if > you expect to re-read it. > > --Hank > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > <mailto:[hidden email]> wrote: > >> >> I am new to the list and was not successful in searching the archives >> for this issue. I am writing a web app to edit a Java properties file >> that is part of a Java application. The app reads the XML >> configuration file when starting, edits and adding items works but I >> can't write the xml file back to its original location on the server. >> I can write to and read from the exists database. Is there any way to >> write the XML on the server? >> >> -- >> You receive this message as a subscriber of the [hidden email] >> <mailto:[hidden email]> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws > > Hank Ratzesberger > NEES@UCSB > Institute for Crustal Studies, > University of California, Santa Barbara > 805-893-8042 > > > > > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by GEORGE.ADAMS
I am still struggling with getting a file saved back on the server. I have tried the code below and multiple variations of it. I am no longer getting an error stating the save failed but no file is written. The resulting URL is ending up at a page named xforms-server-submit and it displays what looks like the original viewzones.xhtml page but the images are broken so the context is wrong. Any help would be appreciated. I have read the recent posts about debugging but can't find any ops.log files. The starting page is viewzones.xhtml and contains the following code; In the xforms:model <xforms:submission id="save-submission2" method="post" action="."/> or <xforms:submission id="save-submission2" method="post" action="save.xpl"/> In the body <xforms:group> <xforms:trigger> <xforms:label><xhtml:img src="../apps/sifshared/images/save.gif" alt="Save"/>Save</xforms:label> </xforms:trigger> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance">instance('agent-instance')</xforms:setvalue> <xforms:send submission="save-submission2"/> </xforms:action> </xforms:group> -------- save.xpl is as follows <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <p:param name="instance" type="input"/> <p:param name="data" type="output"/> <!-- Convert a document to serialized XML --> <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <encoding>utf-8</encoding> </config> </p:input> <p:input name="instance" /> <p:output name="data" id="converted"/> </p:processor> <!-- Write the document to a file --> <p:processor name="oxf:file-serializer"> <p:input name="config"> <config> <directory>/sifshared/</directory> <file>configTest2.xml</file> <make-directories>true</make-directories> <append>false</append> </config> </p:input> <p:input name="data" href="#converted"/> </p:processor> </p:config> ----------- The page-flow.xml is as follows <config xmlns="http://www.orbeon.com/oxf/controller"> <page path-info="/sifzones/" view="viewzones.xhtml"/> <page id="save-submission2" path-info="/sifzones/save.xpl" view="viewzones.xhtml"> </page> <epilogue url="oxf:/config/epilogue.xpl"/> </config> George Adams Educational Technology / Integration Services 651 603-4891
Yes, that will work. You can call the oxf:file-serializer from XPL, and then you need to hook-up XPL to XForms, either by using the xxforms:call-xpl() XPath extension function or by using an XForms submission. In theory, file: and oxf: URLs should be supported by XForms submission in Orbeon Forms, but at the moment we don't support that. If somebody feels like fixing this, you are welcome! This would involve changes to XFormsModelSubmission.java. -Erik Hank Ratzesberger wrote: > > George, > > I think what you want is the file-serializer: > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > This pipeline will write the xml to a file, also keep it cached if > you expect to re-read it. > > --Hank > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > <mailto:[hidden email]> wrote: > >> >> I am new to the list and was not successful in searching the archives >> for this issue. I am writing a web app to edit a Java properties file >> that is part of a Java application. The app reads the XML >> configuration file when starting, edits and adding items works but I >> can't write the xml file back to its original location on the server. >> I can write to and read from the exists database. Is there any way to >> write the XML on the server? >> >> -- >> You receive this message as a subscriber of the [hidden email] >> <mailto:[hidden email]> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws > > Hank Ratzesberger > NEES@UCSB > Institute for Crustal Studies, > University of California, Santa Barbara > 805-893-8042 > > > > > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
George,
Can you package the code of your application under the RESOURCES/apps directory as a zip archive? This would make it easier to run it and figure out what's wrong. -Erik On Nov 22, 2007, at 6:06 AM, [hidden email] wrote: > > I am still struggling with getting a file saved back on the server. > I have tried the code below and multiple variations of it. I am no > longer getting an error stating the save failed but no file is > written. The resulting URL is ending up at a page named xforms- > server-submit and it displays what looks like the original > viewzones.xhtml page but the images are broken so the context is > wrong. > Any help would be appreciated. I have read the recent posts about > debugging but can't find any ops.log files. > > The starting page is viewzones.xhtml and contains the following code; > In the xforms:model > <xforms:submission id="save-submission2" method="post" action="."/> > or > <xforms:submission id="save-submission2" method="post" > action="save.xpl"/> > > In the body > <xforms:group> > <xforms:trigger> > <xforms:label><xhtml:img src="../apps/sifshared/ > images/save.gif" alt="Save"/>Save</xforms:label> > </xforms:trigger> > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue > ref="instance">instance('agent-instance')</xforms:setvalue> > <xforms:send submission="save-submission2"/> > </xforms:action> > </xforms:group> > > -------- > save.xpl is as follows > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > <!-- Convert a document to serialized XML --> > <p:processor name="oxf:xml-converter"> > <p:input name="config"> > <config> > <encoding>utf-8</encoding> > </config> > </p:input> > <p:input name="instance" /> > <p:output name="data" id="converted"/> > </p:processor> > <!-- Write the document to a file --> > <p:processor name="oxf:file-serializer"> > <p:input name="config"> > <config> > <directory>/sifshared/</directory> > <file>configTest2.xml</file> > <make-directories>true</make-directories> > <append>false</append> > </config> > </p:input> > <p:input name="data" href="#converted"/> > </p:processor> > </p:config> > > ----------- > The page-flow.xml is as follows > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/sifzones/" view="viewzones.xhtml"/> > <page id="save-submission2" path-info="/sifzones/save.xpl" > view="viewzones.xhtml"> > </page> > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > > George Adams > Educational Technology / Integration Services > 651 603-4891 > > > Erik Bruchez <[hidden email]> > Sent by: Erik Bruchez <[hidden email]> > 10/16/07 12:48 PM > Please respond to > [hidden email] > > To > [hidden email] > cc > Subject > Re: [ops-users] Saving XML file on server > > > > > > Yes, that will work. You can call the oxf:file-serializer from XPL, > and > then you need to hook-up XPL to XForms, either by using the > xxforms:call-xpl() XPath extension function or by using an XForms > submission. > > In theory, file: and oxf: URLs should be supported by XForms > submission > in Orbeon Forms, but at the moment we don't support that. If somebody > feels like fixing this, you are welcome! This would involve changes to > XFormsModelSubmission.java. > > -Erik > > Hank Ratzesberger wrote: > > > > George, > > > > I think what you want is the file-serializer: > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > This pipeline will write the xml to a file, also keep it cached if > > you expect to re-read it. > > > > --Hank > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > <mailto:[hidden email]> wrote: > > > >> > >> I am new to the list and was not successful in searching the > archives > >> for this issue. I am writing a web app to edit a Java properties > file > >> that is part of a Java application. The app reads the XML > >> configuration file when starting, edits and adding items works > but I > >> can't write the xml file back to its original location on the > server. > >> I can write to and read from the exists database. Is there any > way to > >> write the XML on the server? > >> > >> -- > >> You receive this message as a subscriber of the [hidden email] > >> <mailto:[hidden email]> mailing list. > >> To unsubscribe: mailto:[hidden email] > >> For general help: mailto:[hidden email]?subject=help > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > Hank Ratzesberger > > NEES@UCSB > > Institute for Crustal Studies, > > University of California, Santa Barbara > > 805-893-8042 > > > > > > > > > > > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Here is the apps folder zipped up. The sifzones app is probably closer to right than the other apps/pages George Adams Educational Technology / Integration Services 651 603-4891
George, Can you package the code of your application under the RESOURCES/apps directory as a zip archive? This would make it easier to run it and figure out what's wrong. -Erik On Nov 22, 2007, at 6:06 AM, [hidden email] wrote: > > I am still struggling with getting a file saved back on the server. > I have tried the code below and multiple variations of it. I am no > longer getting an error stating the save failed but no file is > written. The resulting URL is ending up at a page named xforms- > server-submit and it displays what looks like the original > viewzones.xhtml page but the images are broken so the context is > wrong. > Any help would be appreciated. I have read the recent posts about > debugging but can't find any ops.log files. > > The starting page is viewzones.xhtml and contains the following code; > In the xforms:model > <xforms:submission id="save-submission2" method="post" action="."/> > or > <xforms:submission id="save-submission2" method="post" > action="save.xpl"/> > > In the body > <xforms:group> > <xforms:trigger> > <xforms:label><xhtml:img src="../apps/sifshared/ > images/save.gif" alt="Save"/>Save</xforms:label> > </xforms:trigger> > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue > ref="instance">instance('agent-instance')</xforms:setvalue> > <xforms:send submission="save-submission2"/> > </xforms:action> > </xforms:group> > > -------- > save.xpl is as follows > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > <!-- Convert a document to serialized XML --> > <p:processor name="oxf:xml-converter"> > <p:input name="config"> > <config> > <encoding>utf-8</encoding> > </config> > </p:input> > <p:input name="instance" /> > <p:output name="data" id="converted"/> > </p:processor> > <!-- Write the document to a file --> > <p:processor name="oxf:file-serializer"> > <p:input name="config"> > <config> > <directory>/sifshared/</directory> > <file>configTest2.xml</file> > <make-directories>true</make-directories> > <append>false</append> > </config> > </p:input> > <p:input name="data" href="#converted"/> > </p:processor> > </p:config> > > ----------- > The page-flow.xml is as follows > > <config xmlns="http://www.orbeon.com/oxf/controller"> > <page path-info="/sifzones/" view="viewzones.xhtml"/> > <page id="save-submission2" path-info="/sifzones/save.xpl" > view="viewzones.xhtml"> > </page> > <epilogue url="oxf:/config/epilogue.xpl"/> > </config> > > > George Adams > Educational Technology / Integration Services > 651 603-4891 > > > Erik Bruchez <[hidden email]> > Sent by: Erik Bruchez <[hidden email]> > 10/16/07 12:48 PM > Please respond to > [hidden email] > > To > [hidden email] > cc > Subject > Re: [ops-users] Saving XML file on server > > > > > > Yes, that will work. You can call the oxf:file-serializer from XPL, > and > then you need to hook-up XPL to XForms, either by using the > xxforms:call-xpl() XPath extension function or by using an XForms > submission. > > In theory, file: and oxf: URLs should be supported by XForms > submission > in Orbeon Forms, but at the moment we don't support that. If somebody > feels like fixing this, you are welcome! This would involve changes to > XFormsModelSubmission.java. > > -Erik > > Hank Ratzesberger wrote: > > > > George, > > > > I think what you want is the file-serializer: > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > This pipeline will write the xml to a file, also keep it cached if > > you expect to re-read it. > > > > --Hank > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > <mailto:[hidden email]> wrote: > > > >> > >> I am new to the list and was not successful in searching the > archives > >> for this issue. I am writing a web app to edit a Java properties > file > >> that is part of a Java application. The app reads the XML > >> configuration file when starting, edits and adding items works > but I > >> can't write the xml file back to its original location on the > server. > >> I can write to and read from the exists database. Is there any > way to > >> write the XML on the server? > >> > >> -- > >> You receive this message as a subscriber of the [hidden email] > >> <mailto:[hidden email]> mailing list. > >> To unsubscribe: mailto:[hidden email] > >> For general help: mailto:[hidden email]?subject=help > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > Hank Ratzesberger > > NEES@UCSB > > Institute for Crustal Studies, > > University of California, Santa Barbara > > 805-893-8042 > > > > > > > > > > > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws apps.zip (143K) Download Attachment |
Administrator
|
George,
I had a look at your app and I managed to make it work. I attached the updated sifzones directory with my changes. FYI this is what I had to change: * The submission must refer to a URL (@action attribute) defined in the page flow. In this case, I defined in the page flow: <page path-info="/sifzones/save" model="savexx.xpl"/> which means that my submission looks like this: <xforms:submission id="save-submission2" ref="instance('agent- instance')" method="post" action="save" replace="none"/> Note that the action is just "save" because the URL is relative to the calling path, which is /sifzones/. So the resulting URL is "/ sifzones/save". The use of a relative URL makes it possible to move files around easily. * In the submission, I also used replace="none", as the default consists in replacing the entire page. * savexx.xpl uses the oxf:url-serializer processor, which is able to write to your resources, as opposed to the oxf:file-serializer, which requires an absolute path to the directory or file to use. * savexx.xpl had to be fixed-up a bit more. The "instance" input has to be connected to the oxf:url-serializer processor, for example. * Note that savexx.xpl is defined as a page model in the page flow, because it does not produce any output, and defining it as a page view would require such an output. -Erik On Nov 26, 2007, at 5:24 PM, [hidden email] wrote: > > Here is the apps folder zipped up. > The sifzones app is probably closer to right than the other apps/pages > > George Adams > Educational Technology / Integration Services > 651 603-4891 > > > Erik Bruchez <[hidden email]> > Sent by: Erik Bruchez <[hidden email]> > 11/26/07 06:14 PM > Please respond to > [hidden email] > > To > [hidden email] > cc > Subject > Re: [ops-users] Saving XML file on server > > > > > > George, > > Can you package the code of your application under the RESOURCES/apps > directory as a zip archive? This would make it easier to run it and > figure out what's wrong. > > -Erik > > On Nov 22, 2007, at 6:06 AM, [hidden email] wrote: > > > > > I am still struggling with getting a file saved back on the server. > > I have tried the code below and multiple variations of it. I am no > > longer getting an error stating the save failed but no file is > > written. The resulting URL is ending up at a page named xforms- > > server-submit and it displays what looks like the original > > viewzones.xhtml page but the images are broken so the context is > > wrong. > > Any help would be appreciated. I have read the recent posts about > > debugging but can't find any ops.log files. > > > > The starting page is viewzones.xhtml and contains the following > code; > > In the xforms:model > > <xforms:submission id="save-submission2" method="post" action="."/> > > or > > <xforms:submission id="save-submission2" method="post" > > action="save.xpl"/> > > > > In the body > > <xforms:group> > > <xforms:trigger> > > <xforms:label><xhtml:img src="../apps/sifshared/ > > images/save.gif" alt="Save"/>Save</xforms:label> > > </xforms:trigger> > > <xforms:action ev:event="DOMActivate"> > > <xforms:setvalue > > ref="instance">instance('agent-instance')</xforms:setvalue> > > <xforms:send submission="save-submission2"/> > > </xforms:action> > > </xforms:group> > > > > -------- > > save.xpl is as follows > > > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > > xmlns:oxf="http://www.orbeon.com/oxf/processors" > > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > > > <p:param name="instance" type="input"/> > > <p:param name="data" type="output"/> > > <!-- Convert a document to serialized XML --> > > <p:processor name="oxf:xml-converter"> > > <p:input name="config"> > > <config> > > <encoding>utf-8</encoding> > > </config> > > </p:input> > > <p:input name="instance" /> > > <p:output name="data" id="converted"/> > > </p:processor> > > <!-- Write the document to a file --> > > <p:processor name="oxf:file-serializer"> > > <p:input name="config"> > > <config> > > <directory>/sifshared/</directory> > > <file>configTest2.xml</file> > > <make-directories>true</make-directories> > > <append>false</append> > > </config> > > </p:input> > > <p:input name="data" href="#converted"/> > > </p:processor> > > </p:config> > > > > ----------- > > The page-flow.xml is as follows > > > > <config xmlns="http://www.orbeon.com/oxf/controller"> > > <page path-info="/sifzones/" view="viewzones.xhtml"/> > > <page id="save-submission2" path-info="/sifzones/save.xpl" > > view="viewzones.xhtml"> > > </page> > > <epilogue url="oxf:/config/epilogue.xpl"/> > > </config> > > > > > > George Adams > > Educational Technology / Integration Services > > 651 603-4891 > > > > > > Erik Bruchez <[hidden email]> > > Sent by: Erik Bruchez <[hidden email]> > > 10/16/07 12:48 PM > > Please respond to > > [hidden email] > > > > To > > [hidden email] > > cc > > Subject > > Re: [ops-users] Saving XML file on server > > > > > > > > > > > > Yes, that will work. You can call the oxf:file-serializer from XPL, > > and > > then you need to hook-up XPL to XForms, either by using the > > xxforms:call-xpl() XPath extension function or by using an XForms > > submission. > > > > In theory, file: and oxf: URLs should be supported by XForms > > submission > > in Orbeon Forms, but at the moment we don't support that. If > somebody > > feels like fixing this, you are welcome! This would involve > changes to > > XFormsModelSubmission.java. > > > > -Erik > > > > Hank Ratzesberger wrote: > > > > > > George, > > > > > > I think what you want is the file-serializer: > > > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > > > This pipeline will write the xml to a file, also keep it cached if > > > you expect to re-read it. > > > > > > --Hank > > > > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > > <mailto:[hidden email]> wrote: > > > > > >> > > >> I am new to the list and was not successful in searching the > > archives > > >> for this issue. I am writing a web app to edit a Java properties > > file > > >> that is part of a Java application. The app reads the XML > > >> configuration file when starting, edits and adding items works > > but I > > >> can't write the xml file back to its original location on the > > server. > > >> I can write to and read from the exists database. Is there any > > way to > > >> write the XML on the server? > > >> > > >> -- > > >> You receive this message as a subscriber of the [hidden email] > > >> <mailto:[hidden email]> mailing list. > > >> To unsubscribe: mailto:[hidden email] > > >> For general help: mailto:[hidden email]?subject=help > > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > Hank Ratzesberger > > > NEES@UCSB > > > Institute for Crustal Studies, > > > University of California, Santa Barbara > > > 805-893-8042 > > > > > > > > > > > > > > > > > > > > > -- > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > > http://www.orbeon.com/ > > > > -- > > 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 > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > -- > > 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 > > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > <apps.zip> Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws sifzones.zip (3K) Download Attachment |
Erik, This is now writing a file named configTest2.xml as expected but the file is blank. Is it not passing the agent-instance or not writing it for some reason. George Adams Educational Technology / Integration Services 651 603-4891
George, I had a look at your app and I managed to make it work. I attached the updated sifzones directory with my changes. FYI this is what I had to change: * The submission must refer to a URL (@action attribute) defined in the page flow. In this case, I defined in the page flow: <page path-info="/sifzones/save" model="savexx.xpl"/> which means that my submission looks like this: <xforms:submission id="save-submission2" ref="instance('agent- instance')" method="post" action="save" replace="none"/> Note that the action is just "save" because the URL is relative to the calling path, which is /sifzones/. So the resulting URL is "/ sifzones/save". The use of a relative URL makes it possible to move files around easily. * In the submission, I also used replace="none", as the default consists in replacing the entire page. * savexx.xpl uses the oxf:url-serializer processor, which is able to write to your resources, as opposed to the oxf:file-serializer, which requires an absolute path to the directory or file to use. * savexx.xpl had to be fixed-up a bit more. The "instance" input has to be connected to the oxf:url-serializer processor, for example. * Note that savexx.xpl is defined as a page model in the page flow, because it does not produce any output, and defining it as a page view would require such an output. -Erik On Nov 26, 2007, at 5:24 PM, [hidden email] wrote: > > Here is the apps folder zipped up. > The sifzones app is probably closer to right than the other apps/pages > > George Adams > Educational Technology / Integration Services > 651 603-4891 > > > Erik Bruchez <[hidden email]> > Sent by: Erik Bruchez <[hidden email]> > 11/26/07 06:14 PM > Please respond to > [hidden email] > > To > [hidden email] > cc > Subject > Re: [ops-users] Saving XML file on server > > > > > > George, > > Can you package the code of your application under the RESOURCES/apps > directory as a zip archive? This would make it easier to run it and > figure out what's wrong. > > -Erik > > On Nov 22, 2007, at 6:06 AM, [hidden email] wrote: > > > > > I am still struggling with getting a file saved back on the server. > > I have tried the code below and multiple variations of it. I am no > > longer getting an error stating the save failed but no file is > > written. The resulting URL is ending up at a page named xforms- > > server-submit and it displays what looks like the original > > viewzones.xhtml page but the images are broken so the context is > > wrong. > > Any help would be appreciated. I have read the recent posts about > > debugging but can't find any ops.log files. > > > > The starting page is viewzones.xhtml and contains the following > code; > > In the xforms:model > > <xforms:submission id="save-submission2" method="post" action="."/> > > or > > <xforms:submission id="save-submission2" method="post" > > action="save.xpl"/> > > > > In the body > > <xforms:group> > > <xforms:trigger> > > <xforms:label><xhtml:img src="../apps/sifshared/ > > images/save.gif" alt="Save"/>Save</xforms:label> > > </xforms:trigger> > > <xforms:action ev:event="DOMActivate"> > > <xforms:setvalue > > ref="instance">instance('agent-instance')</xforms:setvalue> > > <xforms:send submission="save-submission2"/> > > </xforms:action> > > </xforms:group> > > > > -------- > > save.xpl is as follows > > > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > > xmlns:oxf="http://www.orbeon.com/oxf/processors" > > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > > > <p:param name="instance" type="input"/> > > <p:param name="data" type="output"/> > > <!-- Convert a document to serialized XML --> > > <p:processor name="oxf:xml-converter"> > > <p:input name="config"> > > <config> > > <encoding>utf-8</encoding> > > </config> > > </p:input> > > <p:input name="instance" /> > > <p:output name="data" id="converted"/> > > </p:processor> > > <!-- Write the document to a file --> > > <p:processor name="oxf:file-serializer"> > > <p:input name="config"> > > <config> > > <directory>/sifshared/</directory> > > <file>configTest2.xml</file> > > <make-directories>true</make-directories> > > <append>false</append> > > </config> > > </p:input> > > <p:input name="data" href="#converted"/> > > </p:processor> > > </p:config> > > > > ----------- > > The page-flow.xml is as follows > > > > <config xmlns="http://www.orbeon.com/oxf/controller"> > > <page path-info="/sifzones/" view="viewzones.xhtml"/> > > <page id="save-submission2" path-info="/sifzones/save.xpl" > > view="viewzones.xhtml"> > > </page> > > <epilogue url="oxf:/config/epilogue.xpl"/> > > </config> > > > > > > George Adams > > Educational Technology / Integration Services > > 651 603-4891 > > > > > > Erik Bruchez <[hidden email]> > > Sent by: Erik Bruchez <[hidden email]> > > 10/16/07 12:48 PM > > Please respond to > > [hidden email] > > > > To > > [hidden email] > > cc > > Subject > > Re: [ops-users] Saving XML file on server > > > > > > > > > > > > Yes, that will work. You can call the oxf:file-serializer from XPL, > > and > > then you need to hook-up XPL to XForms, either by using the > > xxforms:call-xpl() XPath extension function or by using an XForms > > submission. > > > > In theory, file: and oxf: URLs should be supported by XForms > > submission > > in Orbeon Forms, but at the moment we don't support that. If > somebody > > feels like fixing this, you are welcome! This would involve > changes to > > XFormsModelSubmission.java. > > > > -Erik > > > > Hank Ratzesberger wrote: > > > > > > George, > > > > > > I think what you want is the file-serializer: > > > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > > > This pipeline will write the xml to a file, also keep it cached if > > > you expect to re-read it. > > > > > > --Hank > > > > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > > <mailto:[hidden email]> wrote: > > > > > >> > > >> I am new to the list and was not successful in searching the > > archives > > >> for this issue. I am writing a web app to edit a Java properties > > file > > >> that is part of a Java application. The app reads the XML > > >> configuration file when starting, edits and adding items works > > but I > > >> can't write the xml file back to its original location on the > > server. > > >> I can write to and read from the exists database. Is there any > > way to > > >> write the XML on the server? > > >> > > >> -- > > >> You receive this message as a subscriber of the [hidden email] > > >> <mailto:[hidden email]> mailing list. > > >> To unsubscribe: mailto:[hidden email] > > >> For general help: mailto:[hidden email]?subject=help > > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > Hank Ratzesberger > > > NEES@UCSB > > > Institute for Crustal Studies, > > > University of California, Santa Barbara > > > 805-893-8042 > > > > > > > > > > > > > > > > > > > > > -- > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > > http://www.orbeon.com/ > > > > -- > > 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 > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > -- > > 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 > > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > <apps.zip> -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws sifzones.zip (3K) Download Attachment |
Administrator
|
George,
My bad. In savexx.xpl, replace: <p:input name="instance" href="#instance"/> with: <p:input name="data" href="#instance"/> -Erik On Dec 11, 2007, at 8:35 AM, [hidden email] wrote: > > Erik, > This is now writing a file named configTest2.xml as expected but the > file is blank. Is it not passing the agent-instance or not writing > it for some reason. > > George Adams > Educational Technology / Integration Services > 651 603-4891 > > > Erik Bruchez <[hidden email]> > Sent by: Erik Bruchez <[hidden email]> > 12/10/07 08:18 PM > Please respond to > [hidden email] > > To > [hidden email] > cc > Subject > Re: [ops-users] Saving XML file on server > > > > > > George, > > I had a look at your app and I managed to make it work. I attached the > updated sifzones directory with my changes. FYI this is what I had to > change: > > * The submission must refer to a URL (@action attribute) defined in > the page flow. In this case, I defined in the page flow: > > <page path-info="/sifzones/save" model="savexx.xpl"/> > > which means that my submission looks like this: > > <xforms:submission id="save-submission2" ref="instance('agent- > instance')" > method="post" action="save" replace="none"/> > > Note that the action is just "save" because the URL is relative to > the calling path, which is /sifzones/. So the resulting URL is "/ > sifzones/save". The use of a relative URL makes it possible to move > files around easily. > > * In the submission, I also used replace="none", as the default > consists in replacing the entire page. > > * savexx.xpl uses the oxf:url-serializer processor, which is able to > write to your resources, as opposed to the oxf:file-serializer, which > requires an absolute path to the directory or file to use. > > * savexx.xpl had to be fixed-up a bit more. The "instance" input has > to be connected to the oxf:url-serializer processor, for example. > > * Note that savexx.xpl is defined as a page model in the page flow, > because it does not produce any output, and defining it as a page view > would require such an output. > > -Erik > > > On Nov 26, 2007, at 5:24 PM, [hidden email] wrote: > > > > > Here is the apps folder zipped up. > > The sifzones app is probably closer to right than the other apps/ > pages > > > > George Adams > > Educational Technology / Integration Services > > 651 603-4891 > > > > > > Erik Bruchez <[hidden email]> > > Sent by: Erik Bruchez <[hidden email]> > > 11/26/07 06:14 PM > > Please respond to > > [hidden email] > > > > To > > [hidden email] > > cc > > Subject > > Re: [ops-users] Saving XML file on server > > > > > > > > > > > > George, > > > > Can you package the code of your application under the RESOURCES/ > apps > > directory as a zip archive? This would make it easier to run it and > > figure out what's wrong. > > > > -Erik > > > > On Nov 22, 2007, at 6:06 AM, [hidden email] wrote: > > > > > > > > I am still struggling with getting a file saved back on the > server. > > > I have tried the code below and multiple variations of it. I am no > > > longer getting an error stating the save failed but no file is > > > written. The resulting URL is ending up at a page named xforms- > > > server-submit and it displays what looks like the original > > > viewzones.xhtml page but the images are broken so the context is > > > wrong. > > > Any help would be appreciated. I have read the recent posts about > > > debugging but can't find any ops.log files. > > > > > > The starting page is viewzones.xhtml and contains the following > > code; > > > In the xforms:model > > > <xforms:submission id="save-submission2" method="post" > action="."/> > > > or > > > <xforms:submission id="save-submission2" method="post" > > > action="save.xpl"/> > > > > > > In the body > > > <xforms:group> > > > <xforms:trigger> > > > <xforms:label><xhtml:img src="../apps/sifshared/ > > > images/save.gif" alt="Save"/>Save</xforms:label> > > > </xforms:trigger> > > > <xforms:action ev:event="DOMActivate"> > > > <xforms:setvalue > > > ref="instance">instance('agent-instance')</xforms:setvalue> > > > <xforms:send submission="save-submission2"/> > > > </xforms:action> > > > </xforms:group> > > > > > > -------- > > > save.xpl is as follows > > > > > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > > > xmlns:oxf="http://www.orbeon.com/oxf/processors" > > > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > > > > > <p:param name="instance" type="input"/> > > > <p:param name="data" type="output"/> > > > <!-- Convert a document to serialized XML --> > > > <p:processor name="oxf:xml-converter"> > > > <p:input name="config"> > > > <config> > > > <encoding>utf-8</encoding> > > > </config> > > > </p:input> > > > <p:input name="instance" /> > > > <p:output name="data" id="converted"/> > > > </p:processor> > > > <!-- Write the document to a file --> > > > <p:processor name="oxf:file-serializer"> > > > <p:input name="config"> > > > <config> > > > <directory>/sifshared/</directory> > > > <file>configTest2.xml</file> > > > <make-directories>true</make-directories> > > > <append>false</append> > > > </config> > > > </p:input> > > > <p:input name="data" href="#converted"/> > > > </p:processor> > > > </p:config> > > > > > > ----------- > > > The page-flow.xml is as follows > > > > > > <config xmlns="http://www.orbeon.com/oxf/controller"> > > > <page path-info="/sifzones/" view="viewzones.xhtml"/> > > > <page id="save-submission2" path-info="/sifzones/save.xpl" > > > view="viewzones.xhtml"> > > > </page> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > > > </config> > > > > > > > > > George Adams > > > Educational Technology / Integration Services > > > 651 603-4891 > > > > > > > > > Erik Bruchez <[hidden email]> > > > Sent by: Erik Bruchez <[hidden email]> > > > 10/16/07 12:48 PM > > > Please respond to > > > [hidden email] > > > > > > To > > > [hidden email] > > > cc > > > Subject > > > Re: [ops-users] Saving XML file on server > > > > > > > > > > > > > > > > > > Yes, that will work. You can call the oxf:file-serializer from > XPL, > > > and > > > then you need to hook-up XPL to XForms, either by using the > > > xxforms:call-xpl() XPath extension function or by using an XForms > > > submission. > > > > > > In theory, file: and oxf: URLs should be supported by XForms > > > submission > > > in Orbeon Forms, but at the moment we don't support that. If > > somebody > > > feels like fixing this, you are welcome! This would involve > > changes to > > > XFormsModelSubmission.java. > > > > > > -Erik > > > > > > Hank Ratzesberger wrote: > > > > > > > > George, > > > > > > > > I think what you want is the file-serializer: > > > > > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > > > > > This pipeline will write the xml to a file, also keep it > cached if > > > > you expect to re-read it. > > > > > > > > --Hank > > > > > > > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > > > <mailto:[hidden email]> wrote: > > > > > > > >> > > > >> I am new to the list and was not successful in searching the > > > archives > > > >> for this issue. I am writing a web app to edit a Java > properties > > > file > > > >> that is part of a Java application. The app reads the XML > > > >> configuration file when starting, edits and adding items works > > > but I > > > >> can't write the xml file back to its original location on the > > > server. > > > >> I can write to and read from the exists database. Is there any > > > way to > > > >> write the XML on the server? > > > >> > > > >> -- > > > >> You receive this message as a subscriber of the [hidden email] > > > >> <mailto:[hidden email]> mailing list. > > > >> To unsubscribe: mailto:[hidden email] > > > >> For general help: mailto:[hidden email]?subject=help > > > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > > > Hank Ratzesberger > > > > NEES@UCSB > > > > Institute for Crustal Studies, > > > > University of California, Santa Barbara > > > > 805-893-8042 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > > > http://www.orbeon.com/ > > > > > > -- > > > 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 > > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > > > > -- > > > 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 > > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > -- > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > > http://www.orbeon.com/ > > > > > > -- > > 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 > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > <apps.zip> > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > <sifzones.zip> > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
It is now working for me. Thanks for putting up with all us folks that don't really understand all that goes on with Xforms. George Adams
George, My bad. In savexx.xpl, replace: <p:input name="instance" href="#instance"/> with: <p:input name="data" href="#instance"/> -Erik On Dec 11, 2007, at 8:35 AM, [hidden email] wrote: > > Erik, > This is now writing a file named configTest2.xml as expected but the > file is blank. Is it not passing the agent-instance or not writing > it for some reason. > > George Adams > Educational Technology / Integration Services > 651 603-4891 > > > Erik Bruchez <[hidden email]> > Sent by: Erik Bruchez <[hidden email]> > 12/10/07 08:18 PM > Please respond to > [hidden email] > > To > [hidden email] > cc > Subject > Re: [ops-users] Saving XML file on server > > > > > > George, > > I had a look at your app and I managed to make it work. I attached the > updated sifzones directory with my changes. FYI this is what I had to > change: > > * The submission must refer to a URL (@action attribute) defined in > the page flow. In this case, I defined in the page flow: > > <page path-info="/sifzones/save" model="savexx.xpl"/> > > which means that my submission looks like this: > > <xforms:submission id="save-submission2" ref="instance('agent- > instance')" > method="post" action="save" replace="none"/> > > Note that the action is just "save" because the URL is relative to > the calling path, which is /sifzones/. So the resulting URL is "/ > sifzones/save". The use of a relative URL makes it possible to move > files around easily. > > * In the submission, I also used replace="none", as the default > consists in replacing the entire page. > > * savexx.xpl uses the oxf:url-serializer processor, which is able to > write to your resources, as opposed to the oxf:file-serializer, which > requires an absolute path to the directory or file to use. > > * savexx.xpl had to be fixed-up a bit more. The "instance" input has > to be connected to the oxf:url-serializer processor, for example. > > * Note that savexx.xpl is defined as a page model in the page flow, > because it does not produce any output, and defining it as a page view > would require such an output. > > -Erik > > > On Nov 26, 2007, at 5:24 PM, [hidden email] wrote: > > > > > Here is the apps folder zipped up. > > The sifzones app is probably closer to right than the other apps/ > pages > > > > George Adams > > Educational Technology / Integration Services > > 651 603-4891 > > > > > > Erik Bruchez <[hidden email]> > > Sent by: Erik Bruchez <[hidden email]> > > 11/26/07 06:14 PM > > Please respond to > > [hidden email] > > > > To > > [hidden email] > > cc > > Subject > > Re: [ops-users] Saving XML file on server > > > > > > > > > > > > George, > > > > Can you package the code of your application under the RESOURCES/ > apps > > directory as a zip archive? This would make it easier to run it and > > figure out what's wrong. > > > > -Erik > > > > On Nov 22, 2007, at 6:06 AM, [hidden email] wrote: > > > > > > > > I am still struggling with getting a file saved back on the > server. > > > I have tried the code below and multiple variations of it. I am no > > > longer getting an error stating the save failed but no file is > > > written. The resulting URL is ending up at a page named xforms- > > > server-submit and it displays what looks like the original > > > viewzones.xhtml page but the images are broken so the context is > > > wrong. > > > Any help would be appreciated. I have read the recent posts about > > > debugging but can't find any ops.log files. > > > > > > The starting page is viewzones.xhtml and contains the following > > code; > > > In the xforms:model > > > <xforms:submission id="save-submission2" method="post" > action="."/> > > > or > > > <xforms:submission id="save-submission2" method="post" > > > action="save.xpl"/> > > > > > > In the body > > > <xforms:group> > > > <xforms:trigger> > > > <xforms:label><xhtml:img src="../apps/sifshared/ > > > images/save.gif" alt="Save"/>Save</xforms:label> > > > </xforms:trigger> > > > <xforms:action ev:event="DOMActivate"> > > > <xforms:setvalue > > > ref="instance">instance('agent-instance')</xforms:setvalue> > > > <xforms:send submission="save-submission2"/> > > > </xforms:action> > > > </xforms:group> > > > > > > -------- > > > save.xpl is as follows > > > > > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > > > xmlns:oxf="http://www.orbeon.com/oxf/processors" > > > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > > > > > <p:param name="instance" type="input"/> > > > <p:param name="data" type="output"/> > > > <!-- Convert a document to serialized XML --> > > > <p:processor name="oxf:xml-converter"> > > > <p:input name="config"> > > > <config> > > > <encoding>utf-8</encoding> > > > </config> > > > </p:input> > > > <p:input name="instance" /> > > > <p:output name="data" id="converted"/> > > > </p:processor> > > > <!-- Write the document to a file --> > > > <p:processor name="oxf:file-serializer"> > > > <p:input name="config"> > > > <config> > > > <directory>/sifshared/</directory> > > > <file>configTest2.xml</file> > > > <make-directories>true</make-directories> > > > <append>false</append> > > > </config> > > > </p:input> > > > <p:input name="data" href="#converted"/> > > > </p:processor> > > > </p:config> > > > > > > ----------- > > > The page-flow.xml is as follows > > > > > > <config xmlns="http://www.orbeon.com/oxf/controller"> > > > <page path-info="/sifzones/" view="viewzones.xhtml"/> > > > <page id="save-submission2" path-info="/sifzones/save.xpl" > > > view="viewzones.xhtml"> > > > </page> > > > <epilogue url="oxf:/config/epilogue.xpl"/> > > > </config> > > > > > > > > > George Adams > > > Educational Technology / Integration Services > > > 651 603-4891 > > > > > > > > > Erik Bruchez <[hidden email]> > > > Sent by: Erik Bruchez <[hidden email]> > > > 10/16/07 12:48 PM > > > Please respond to > > > [hidden email] > > > > > > To > > > [hidden email] > > > cc > > > Subject > > > Re: [ops-users] Saving XML file on server > > > > > > > > > > > > > > > > > > Yes, that will work. You can call the oxf:file-serializer from > XPL, > > > and > > > then you need to hook-up XPL to XForms, either by using the > > > xxforms:call-xpl() XPath extension function or by using an XForms > > > submission. > > > > > > In theory, file: and oxf: URLs should be supported by XForms > > > submission > > > in Orbeon Forms, but at the moment we don't support that. If > > somebody > > > feels like fixing this, you are welcome! This would involve > > changes to > > > XFormsModelSubmission.java. > > > > > > -Erik > > > > > > Hank Ratzesberger wrote: > > > > > > > > George, > > > > > > > > I think what you want is the file-serializer: > > > > > > > > http://www.orbeon.com/ops/doc/processors-serializers#file-serializer > > > > > > > > This pipeline will write the xml to a file, also keep it > cached if > > > > you expect to re-read it. > > > > > > > > --Hank > > > > > > > > > > > > On Oct 15, 2007, at 4:05 PM, [hidden email] > > > > <mailto:[hidden email]> wrote: > > > > > > > >> > > > >> I am new to the list and was not successful in searching the > > > archives > > > >> for this issue. I am writing a web app to edit a Java > properties > > > file > > > >> that is part of a Java application. The app reads the XML > > > >> configuration file when starting, edits and adding items works > > > but I > > > >> can't write the xml file back to its original location on the > > > server. > > > >> I can write to and read from the exists database. Is there any > > > way to > > > >> write the XML on the server? > > > >> > > > >> -- > > > >> You receive this message as a subscriber of the [hidden email] > > > >> <mailto:[hidden email]> mailing list. > > > >> To unsubscribe: mailto:[hidden email] > > > >> For general help: mailto:[hidden email]?subject=help > > > >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > > > Hank Ratzesberger > > > > NEES@UCSB > > > > Institute for Crustal Studies, > > > > University of California, Santa Barbara > > > > 805-893-8042 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > > > http://www.orbeon.com/ > > > > > > -- > > > 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 > > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > > > > -- > > > 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 > > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > -- > > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > > http://www.orbeon.com/ > > > > > > -- > > 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 > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > <apps.zip> > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > <sifzones.zip> > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by Erik Bruchez
>> Good catch! It seems that we are doing something in the wrong order
>> then extracting and validating nodes during submission. >> I can't enter a bug right now because the OW2 servers are being >> migrated today, but I will as soon as the servers are back up. > > Bug now entered: > > http://forge.objectweb.org/tracker/index.php?func=detail&aid=307714&group_id=168&atid=350207 FYI this bug is now fixed in CVS. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |