W3C home > Mailing lists > Public > public-xformsusers@w3.org > April 2014

ACTION-1969 - Send list of possible useful functions to do with page

From: Erik Bruchez <erik@bruchez.org>
Date: Tue, 1 Apr 2014 23:24:45 -0700
Message-ID: <CAAc0PEVnc25yDkeS62L7r+LPhKN1OxuqVyUf4rXDJraxB=kH0w@mail.gmail.com>
To: public-forms@w3.org, "public-xformsusers@w3.org" <public-xformsusers@w3.org>

First, eXist has functions which are relevant: [1]

- get-hostname() as xs:string
- get-context-path() as xs:string
- get-path-info() as xs:string
- get-query-string() as xs:string?
- get-header($header-name as xs:string) as xs:string?
- get-header-names() as xs:string*
- get-parameter($name as xs:string, $default-value as item()*,
$failonerror as xs:boolean*) as xs:string*
- get-parameter-names() as xs:string*
- get-uri() as xs:anyURI
- get-url() as xs:string

Orbeon has the following functions: [2]

- get-request-path() as xs:string
- get-request-header($header-name as xs:string) as xs:string*
- get-request-parameter($parameter-name as xs:string) as xs:string*

In both cases, the name of the functions is rather server-oriented.

EXPath doesn't yet have similar functions from what I could tell. [3]

Browsers have Window.location and Document.location, which now has
properties from URLUtils, such as: [4]

- Location.href
- Location.protocol/host/hostname/port
- Location.pathname/search/hash

However there is no API to directly parse and get parameters from the
query string as far as I can tell.

Browsers, of course, have APIs that make sense on the client, and are
not influenced by things like the Java Servlet API.

Now the question is whether and what any of this should be
standardized as part of XForms.


[1] http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/request&location=java:org.exist.xquery.functions.request.RequestModule
[2] http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-HTTP-request-functions
[3] http://expath.org/
[4] https://developer.mozilla.org/en-US/docs/Web/API/Location
Received on Wednesday, 2 April 2014 06:26:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:43 UTC