Hi
I'm trying to save an instance to a different file every time a button is pressed, straightforward enough? Well it writes to file but also inserts loads of spaces, each time I save - the number of spaces increases significantly. What am I doing? OK, I don't want to leave the page so I have replace="none" (I'm guessing this is the best way to do this) like so: <xforms:submission id="save" method="post" replace="none" action="/qpi/qpi-save-user"/> Which in turn when triggered does the following: <page id="save-user" path-info="/qpi/qpi-save-user" model="data-access/save-user-action.xpl" /> save-user-action.xpl: <p:param name="instance" type="input"/> <!-- Convert and serialize to XML --> <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <indent>false</indent> <content-type>application/xml</content-type> <encoding>iso-8859-1</encoding> <version>1.0</version> </config> </p:input> <p:input name="data" href="#instance"/> <p:output name="data" id="for-file"/> </p:processor> <p:processor name="oxf:file-serializer"> <p:input name="data" href="#for-file"/> <p:input name="config"> <config> <content-type>application/xml</content-type> <file>all-users.xml</file> <directory>c:\</directory> <indent>false</indent> </config> </p:input> </p:processor> Thanks in advance for any help with this. Lee Bamford -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Lee,
You need a @ref on your submission, it must have one otherwise it won't send any data! Perhaps ref="instance('main-instance')" ? Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 -----Original Message----- From: [hidden email] [mailto:[hidden email]] Sent: 17 July 2006 16:46 To: [hidden email] Subject: [ops-users] Whitespace Issue When Saving Instance To File Hi I'm trying to save an instance to a different file every time a button is pressed, straightforward enough? Well it writes to file but also inserts loads of spaces, each time I save - the number of spaces increases significantly. What am I doing? OK, I don't want to leave the page so I have replace="none" (I'm guessing this is the best way to do this) like so: <xforms:submission id="save" method="post" replace="none" action="/qpi/qpi-save-user"/> Which in turn when triggered does the following: <page id="save-user" path-info="/qpi/qpi-save-user" model="data-access/save-user-action.xpl" /> save-user-action.xpl: <p:param name="instance" type="input"/> <!-- Convert and serialize to XML --> <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <indent>false</indent> <content-type>application/xml</content-type> <encoding>iso-8859-1</encoding> <version>1.0</version> </config> </p:input> <p:input name="data" href="#instance"/> <p:output name="data" id="for-file"/> </p:processor> <p:processor name="oxf:file-serializer"> <p:input name="data" href="#for-file"/> <p:input name="config"> <config> <content-type>application/xml</content-type> <file>all-users.xml</file> <directory>c:\</directory> <indent>false</indent> </config> </p:input> </p:processor> Thanks in advance for any help with this. Lee Bamford -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
It seems to pick up the default instance without specifying. I am getting
the data but with loads of whitespace. Thanks Lee ----- Original Message ----- From: "Ryan Puddephatt" <[hidden email]> To: <[hidden email]> Sent: Monday, July 17, 2006 4:57 PM Subject: RE: [ops-users] Whitespace Issue When Saving Instance To File > Lee, > You need a @ref on your submission, it must have one otherwise it > won't send any data! Perhaps ref="instance('main-instance')" ? > > > Ryan Puddephatt > Software Engineer > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] > Sent: 17 July 2006 16:46 > To: [hidden email] > Subject: [ops-users] Whitespace Issue When Saving Instance To File > > Hi > > I'm trying to save an instance to a different file every time a button is > pressed, straightforward enough? Well it writes to file but also inserts > loads of spaces, each time I save - the number of spaces increases > significantly. > > What am I doing? OK, I don't want to leave the page so I have > replace="none" > (I'm guessing this is the best way to do this) like so: > > <xforms:submission id="save" method="post" replace="none" > action="/qpi/qpi-save-user"/> > > Which in turn when triggered does the following: > > <page id="save-user" path-info="/qpi/qpi-save-user" > model="data-access/save-user-action.xpl" /> > > save-user-action.xpl: > > <p:param name="instance" type="input"/> > > <!-- Convert and serialize to XML --> > > <p:processor name="oxf:xml-converter"> > <p:input name="config"> > <config> > <indent>false</indent> > <content-type>application/xml</content-type> > <encoding>iso-8859-1</encoding> > <version>1.0</version> > </config> > </p:input> > <p:input name="data" href="#instance"/> > <p:output name="data" id="for-file"/> > </p:processor> > > > <p:processor name="oxf:file-serializer"> > <p:input name="data" href="#for-file"/> > <p:input name="config"> > <config> > <content-type>application/xml</content-type> > <file>all-users.xml</file> > <directory>c:\</directory> > <indent>false</indent> > </config> > </p:input> > </p:processor> > > Thanks in advance for any help with this. > > Lee Bamford > > > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Ryan Puddephatt
Ryan,
This is incorrect in a way ;-) The spec says that "The default value is "/"." So if you don't put an @ref attribute, the default instance will be submitted. It turns out that we were in fact using "/*" as default, which for most practical purposes has the same behavior, but it was not quite as per the spec. I just fixed this. But the spec is clear that the @ref element is optional. -Erik Ryan Puddephatt wrote: > Lee, > You need a @ref on your submission, it must have one otherwise it > won't send any data! Perhaps ref="instance('main-instance')" ? > > > Ryan Puddephatt > Software Engineer > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] > Sent: 17 July 2006 16:46 > To: [hidden email] > Subject: [ops-users] Whitespace Issue When Saving Instance To File > > Hi > > I'm trying to save an instance to a different file every time a button is > pressed, straightforward enough? Well it writes to file but also inserts > loads of spaces, each time I save - the number of spaces increases > significantly. > > What am I doing? OK, I don't want to leave the page so I have replace="none" > (I'm guessing this is the best way to do this) like so: > > <xforms:submission id="save" method="post" replace="none" > action="/qpi/qpi-save-user"/> > > Which in turn when triggered does the following: > > <page id="save-user" path-info="/qpi/qpi-save-user" > model="data-access/save-user-action.xpl" /> > > save-user-action.xpl: > > <p:param name="instance" type="input"/> > > <!-- Convert and serialize to XML --> > > <p:processor name="oxf:xml-converter"> > <p:input name="config"> > <config> > <indent>false</indent> > <content-type>application/xml</content-type> > <encoding>iso-8859-1</encoding> > <version>1.0</version> > </config> > </p:input> > <p:input name="data" href="#instance"/> > <p:output name="data" id="for-file"/> > </p:processor> > > > <p:processor name="oxf:file-serializer"> > <p:input name="data" href="#for-file"/> > <p:input name="config"> > <config> > <content-type>application/xml</content-type> > <file>all-users.xml</file> > <directory>c:\</directory> > <indent>false</indent> > </config> > </p:input> > </p:processor> > > Thanks in advance for any help with this. > > Lee Bamford > > > > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Erik
I'm still not sure how this affects the whitespace issue? Is it that I'm doing something wrong using replace="none" because the instance seems to grow with whitespace each time I do it. Obviously I noticed when printing to file. Any idea? Thanks Lee ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: <[hidden email]> Sent: Monday, July 17, 2006 7:29 PM Subject: Re: [ops-users] Whitespace Issue When Saving Instance To File > Ryan, > > This is incorrect in a way ;-) The spec says that "The default value is > "/"." So if you don't put an @ref attribute, the default instance will > be submitted. It turns out that we were in fact using "/*" as default, > which for most practical purposes has the same behavior, but it was not > quite as per the spec. I just fixed this. > > But the spec is clear that the @ref element is optional. > > -Erik > > Ryan Puddephatt wrote: >> Lee, >> You need a @ref on your submission, it must have one otherwise it >> won't send any data! Perhaps ref="instance('main-instance')" ? >> >> >> Ryan Puddephatt >> Software Engineer >> >> Teleflex Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotland >> EH54 7DP >> >> e> [hidden email] >> t> +44(0)1506 407 110 >> f> +44(0)1506 407 108 >> >> >> -----Original Message----- >> From: [hidden email] [mailto:[hidden email]] >> Sent: 17 July 2006 16:46 >> To: [hidden email] >> Subject: [ops-users] Whitespace Issue When Saving Instance To File >> >> Hi >> >> I'm trying to save an instance to a different file every time a button is >> pressed, straightforward enough? Well it writes to file but also inserts >> loads of spaces, each time I save - the number of spaces increases >> significantly. >> >> What am I doing? OK, I don't want to leave the page so I have >> replace="none" >> (I'm guessing this is the best way to do this) like so: >> >> <xforms:submission id="save" method="post" replace="none" >> action="/qpi/qpi-save-user"/> >> >> Which in turn when triggered does the following: >> >> <page id="save-user" path-info="/qpi/qpi-save-user" >> model="data-access/save-user-action.xpl" /> >> >> save-user-action.xpl: >> >> <p:param name="instance" type="input"/> >> >> <!-- Convert and serialize to XML --> >> >> <p:processor name="oxf:xml-converter"> >> <p:input name="config"> >> <config> >> <indent>false</indent> >> <content-type>application/xml</content-type> >> <encoding>iso-8859-1</encoding> >> <version>1.0</version> >> </config> >> </p:input> >> <p:input name="data" href="#instance"/> >> <p:output name="data" id="for-file"/> >> </p:processor> >> >> >> <p:processor name="oxf:file-serializer"> >> <p:input name="data" href="#for-file"/> >> <p:input name="config"> >> <config> >> <content-type>application/xml</content-type> >> <file>all-users.xml</file> >> <directory>c:\</directory> >> <indent>false</indent> >> </config> >> </p:input> >> </p:processor> >> >> Thanks in advance for any help with this. >> >> Lee Bamford >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- > Orbeon - XForms Everywhere: > http://www.orbeon.com/blog/ > > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Lee,
This is most likely not related to your problem. There should obviously be no "accumulation of spaces". Can you send a small reproducible case? -Erik Lee Bamford wrote: > Hi Erik > > I'm still not sure how this affects the whitespace issue? Is it that I'm > doing something wrong using replace="none" because the instance seems to > grow with whitespace each time I do it. Obviously I noticed when > printing to file. > > Any idea? > > Thanks > Lee > > ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> > To: <[hidden email]> > Sent: Monday, July 17, 2006 7:29 PM > Subject: Re: [ops-users] Whitespace Issue When Saving Instance To File > > >> Ryan, >> >> This is incorrect in a way ;-) The spec says that "The default value is >> "/"." So if you don't put an @ref attribute, the default instance will >> be submitted. It turns out that we were in fact using "/*" as default, >> which for most practical purposes has the same behavior, but it was not >> quite as per the spec. I just fixed this. >> >> But the spec is clear that the @ref element is optional. >> >> -Erik >> >> Ryan Puddephatt wrote: >>> Lee, >>> You need a @ref on your submission, it must have one otherwise it >>> won't send any data! Perhaps ref="instance('main-instance')" ? >>> >>> >>> Ryan Puddephatt >>> Software Engineer >>> >>> Teleflex Group - IT UK >>> 1 Michaelson Square >>> Livingston >>> West Lothian >>> Scotland >>> EH54 7DP >>> >>> e> [hidden email] >>> t> +44(0)1506 407 110 >>> f> +44(0)1506 407 108 >>> >>> >>> -----Original Message----- >>> From: [hidden email] [mailto:[hidden email]] >>> Sent: 17 July 2006 16:46 >>> To: [hidden email] >>> Subject: [ops-users] Whitespace Issue When Saving Instance To File >>> >>> Hi >>> >>> I'm trying to save an instance to a different file every time a >>> button is >>> pressed, straightforward enough? Well it writes to file but also inserts >>> loads of spaces, each time I save - the number of spaces increases >>> significantly. >>> >>> What am I doing? OK, I don't want to leave the page so I have >>> replace="none" >>> (I'm guessing this is the best way to do this) like so: >>> >>> <xforms:submission id="save" method="post" replace="none" >>> action="/qpi/qpi-save-user"/> >>> >>> Which in turn when triggered does the following: >>> >>> <page id="save-user" path-info="/qpi/qpi-save-user" >>> model="data-access/save-user-action.xpl" /> >>> >>> save-user-action.xpl: >>> >>> <p:param name="instance" type="input"/> >>> >>> <!-- Convert and serialize to XML --> >>> >>> <p:processor name="oxf:xml-converter"> >>> <p:input name="config"> >>> <config> >>> <indent>false</indent> >>> <content-type>application/xml</content-type> >>> <encoding>iso-8859-1</encoding> >>> <version>1.0</version> >>> </config> >>> </p:input> >>> <p:input name="data" href="#instance"/> >>> <p:output name="data" id="for-file"/> >>> </p:processor> >>> >>> >>> <p:processor name="oxf:file-serializer"> >>> <p:input name="data" href="#for-file"/> >>> <p:input name="config"> >>> <config> >>> <content-type>application/xml</content-type> >>> <file>all-users.xml</file> >>> <directory>c:\</directory> >>> <indent>false</indent> >>> </config> >>> </p:input> >>> </p:processor> >>> >>> Thanks in advance for any help with this. >>> >>> Lee Bamford >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> -- >>> You receive this message as a subscriber of the >>> [hidden email] mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> >> >> -- >> Orbeon - XForms Everywhere: >> http://www.orbeon.com/blog/ >> >> >> > > > -------------------------------------------------------------------------------- > > > >> >> -- >> You receive this message as a subscriber of the >> [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> > > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |