Re: Builder Module 1.0

> 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:

- ``, which contains XForms as well
as standard XPath functions and does not require a prefix

- ``, 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


On Fri, Nov 20, 2020 at 9:48 AM Michael Kay <> 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 (
> 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 <>
> 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:
> 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