- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Mon, 23 Nov 2020 17:12:18 -0800
- To: Michael Kay <mike@saxonica.com>
- Cc: Steven Pemberton <steven.pemberton@cwi.nl>, XForms <public-xformsusers@w3.org>
- Message-ID: <CAAc0PEUXtQLtoD78JEat=tUVJhPYDm1QcBByzgPhhHGe0iTJSQ@mail.gmail.com>
> Clearly a/b/c/element(*) creates scope for ambiguity: how is this handled in XForms? That's a good point. We say that XForms functions are available in two namespaces: - `http://www.w3.org/2002/xforms-functions`, which contains XForms as well as standard XPath functions and does not require a prefix - `http://www.w3.org/2002/xforms`, which only contains XForms functions, and is used with an explicit prefix, typically `xf:` (There are a few exceptions for backward compatibility as some older XForms functions clashed with XPath 2+ functions.) I think that this means that we must mandate, in XForms, that the `element()` and `attribute()` functions *must* be used with an explicit namespace prefix. For consistency this would apply to other node creation functions. If a standard namespace is defined, we could expose these functions in that namespace as well as the XForms namespace (for convenience). -Erik On Fri, Nov 20, 2020 at 9:48 AM Michael Kay <mike@saxonica.com> wrote: > Thanks. I was aware of these functions, and I guess they probably inspired > my thinking at some stage, though I'm not sure I would want to be > constrained to be 100% compatible. > > One concern is how the functions are named. XQuery ( > https://www.w3.org/TR/xquery-31/#id-reserved-fn-names) states that the > unprefixed names element() and attribute() (as well as comment() and > text()) are reserved; and document() is already in use as a function name. > Clearly a/b/c/element(*) creates scope for ambiguity: how is this handled > in XForms? In the proposed Builder module I tried to resolve this by > putting the functions in their own namespace. It's not a perfect solution > (I don't like proliferation of namespaces), but in the circumstances it > seems better than other options available. > > Mike > > On 20 Nov 2020, at 13:43, Steven Pemberton <steven.pemberton@cwi.nl> > wrote: > > Hi Mike, > > The XForms group is interested to see your proposal, because it matches > parts of what have been in XForms for some time: > > > https://www.w3.org/community/xformsusers/wiki/XForms_2.0#XML_manipulation_functions > > So we would like to make sure we stay as coordinated as possible (to avoid > what has happened in the past, for instance functions being added to XPath > that were already in XForms, but with a slightly different name or > semantic.) > > Best wishes, > > Steven > > >
Received on Tuesday, 24 November 2020 01:12:43 UTC