Re: [Xsltforms-support] how can I get the query string parameters in xforms
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-07-31 07:55:55
|
Mathias, > I can't find a way to get at the document uri. Can you give me an example? > I tried with document-uri, but that's not there. fn:document-uri(node) is an XPath 2.0 function and its support could be added in XSLTForms... You can try to define it yourself in Javascript this way : <script type="text/javascript">//<![CDATA[ XPathCoreFunctions["fn:document-uri"]= new XPathFunction(false, XPathFunction.DEFAULT_NONE, false, function(node) { ... }); //]]></script> > Is the general idea of > > <xf:submission ... > > <xf:resource value=(substring-after(document-uri(instance(??), '?')) /> > </xf:submission> ^^^^^^^^^^^^^^^ ^^ > this is obviously only a first shot Which instance?? > Yes, this should look like this. Orbeon is the only XForms implementation supporting XPath 2.0 and it would be a good idea to analyze its behavior according to the node parameter. Depending whether the instance is embedded or loaded externally, the return value should be different... Regards, -Alain |