Hi, I would like to generate some XML content via a URL service. I used the 'oxf:xslt' processor to generate the URL first and then the 'oxf:url-generator' processor to generate the XML content - see below. The URL contains '&' characters which needs to be escaped to & in the XSLT process. How do I unescaped the '&' for the url-generator processor? Regards, Boon <p:processor name="oxf:xslt"> <p:input name="data" href="#instance"/> <p:input name="config"> <config xsl:version="2.0"> </url> <content-type>text/xml</content-type> <validating>false</validating> </config> </p:input> <p:output name="data" id="datastreams"/> <p:output name="data" ref="instance"/> </p:processor> <p:processor name="oxf:url-generator"> <p:input name="config" href="#datastreams"/> <p:output name="data" ref="instance"/> </p:processor--> ----- Boon Low System Development Officer, EGEE Training and Induction UK National e-Science Centre -- 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
|
Hi Boon,
You should not need to unescape "&". I have just tried to run the attached XPL in the XPL sandbox. It calls the URL generator for a URL that just displays the query string, and it works as expected. Alex On 2/24/06, Boon Low <[hidden email]> wrote: > Hi, > > I would like to generate some XML content via a URL service. I used the > 'oxf:xslt' processor to generate the URL first and then the > 'oxf:url-generator' processor to generate the XML content - see below. The > URL contains '&' characters which needs to be escaped to & in the XSLT > process. > > How do I unescaped the '&' for the url-generator processor? > > Regards, > > Boon > > > <p:processor name="oxf:xslt"> > <p:input name="data" href="#instance"/> > <p:input name="config"> > <config xsl:version="2.0"> > > <url>http://baseurl?etc=xxx&parameter=xxx > </url> > <content-type>text/xml</content-type> > <validating>false</validating> > </config> > </p:input> > <p:output name="data" id="datastreams"/> > <p:output name="data" ref="instance"/> > </p:processor> > > <p:processor name="oxf:url-generator"> > <p:input name="config" href="#datastreams"/> > <p:output name="data" ref="instance"/> > </p:processor--> > > > ----- > Boon Low > System Development Officer, > EGEE Training and Induction > UK National e-Science Centre > http://homepages.ed.ac.uk/boon > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): 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 url-gen.xml (1K) Download Attachment
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi,
I just encountered the same problem as Boon did a couple of years ago, namely that you have to escape an ampersand character when dynamically creating a query string you want to pass to the url-generator. However this is then not valid as input to the url-generator. I don't doubt that you can hard code & characters in URL's passed directly to the url-generator as Alex says, but this is different to using the xslt processor to generate the configuration. Does anyone know if there is a way to work around this such that the XSLT processor can successfully generate a dynamic configuration URL input for the url-generator? In summary I'm trying to dynamically generate a URL of the form: http://base-url/page?param1=xxx¶m2=yyy and then pass this to the url-generator. If someone can point me in the right direction that would be greatly appreciated. Regards, Neil
|
Administrator
|
Neil,
I am not sure to understand what the problem is. Could you maybe attach an example of XPL that runs in the XPL sandbox and that shows the issue you are having? Alex On Dec 13, 2008, at 9:08 AM, ncrofts <[hidden email]> wrote: > > Hi, > > I just encountered the same problem as Boon did a couple of years ago, > namely that you have to escape an ampersand character when dynamically > creating a query string you want to pass to the url-generator. > However this is then not valid as input to the url-generator. > > I don't doubt that you can hard code & characters in URL's passed > directly > to the url-generator as Alex says, but this is different to using > the xslt > processor to generate the configuration. > > Does anyone know if there is a way to work around this such that the > XSLT > processor can successfully generate a dynamic configuration URL > input for > the url-generator? > > In summary I'm trying to dynamically generate a URL of the form: > > http://base-url/page?param1=xxx¶m2=yyy > > and then pass this to the url-generator. > > If someone can point me in the right direction that would be greatly > appreciated. > > Regards, > Neil > > > > Alessandro Vernet wrote: >> >> Hi Boon, >> >> You should not need to unescape "&". I have just tried to run the >> attached XPL in the XPL sandbox. It calls the URL generator for a URL >> that just displays the query string, and it works as expected. >> >> Alex >> >> On 2/24/06, Boon Low <[hidden email]> wrote: >>> Hi, >>> >>> I would like to generate some XML content via a URL service. I >>> used the >>> 'oxf:xslt' processor to generate the URL first and then the >>> 'oxf:url-generator' processor to generate the XML content - see >>> below. >>> The >>> URL contains '&' characters which needs to be escaped to & in >>> the >>> XSLT >>> process. >>> >>> How do I unescaped the '&' for the url-generator processor? >>> >>> Regards, >>> >>> Boon >>> >>> >>> <p:processor name="oxf:xslt"> >>> <p:input name="data" href="#instance"/> >>> <p:input name="config"> >>> <config xsl:version="2.0"> >>> >>> <url>http://baseurl?etc=xxx&parameter=xxx >>> </url> >>> <content-type>text/xml</content-type> >>> <validating>false</validating> >>> </config> >>> </p:input> >>> <p:output name="data" id="datastreams"/> >>> <p:output name="data" ref="instance"/> >>> </p:processor> >>> >>> <p:processor name="oxf:url-generator"> >>> <p:input name="config" href="#datastreams"/> >>> <p:output name="data" ref="instance"/> >>> </p:processor--> >>> >>> >>> ----- >>> Boon Low >>> System Development Officer, >>> EGEE Training and Induction >>> UK National e-Science Centre >>> http://homepages.ed.ac.uk/boon >>> >>> >>> >>> -- >>> 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 >>> >>> >>> >> >> >> -- >> Blog (XML, Web apps, Open Source): >> http://www.orbeon.com/blog/ >> >> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:oxf="http://www.orbeon.com/oxf/processors"> >> >> <p:param name="data" type="input"/> >> <p:param name="data" type="output"/> >> >> <p:processor name="oxf:xslt"> >> <p:input name="data" href="#data"/> >> <p:input name="config"> >> <config xsl:version="2.0"> >> >> <url>http://www.scdi.org/~avernet/try/query-string.php?a=1&b=2</ >> url> >> <content-type>text/xml</content-type> >> <validating>false</validating> >> </config> >> </p:input> >> <p:output name="data" id="datastreams"/> >> </p:processor> >> >> <p:processor name="oxf:url-generator"> >> <p:input name="config" href="#datastreams"/> >> <p:output name="data" ref="data"/> >> </p:processor> >> >> </p:config> >> >> -- >> 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 >> >> > > -- > View this message in context: http://www.nabble.com/--character-and-url-generator-tp3107463p20990525.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.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 |
Alex,
I've attached an XPL file of the form that showed the issue...only slight problem I've got now is finding a URL that you can use which exhibits the problem. The attached file needs to reference a URL which expects two query string parameters. I'm afraid I can't use the one I used to originally, as it is a private customers network, which I'm not allowed to share. The input XML is of the form: <form> <url>http://www.orbeon.com</url> <alpha>hello</alpha> <beta>goodbye</beta> </form> The problem appears to me to be that the XSLT generated & character is output to the url-generator and then not output in a way that a server processing that can use. When I used it I found that the second parameter was not found. Is this any clearer...sorry if I'm not being specific enough. Regards, Neil test.xpltest.xpl |
Free forum by Nabble | Edit this page |