W3C home > Mailing lists > Public > www-forms@w3.org > March 2002

RE: Where to declare namespaces for binding expressions?

From: Mikko Honkala <honkkis@tml.hut.fi>
Date: Thu, 28 Mar 2002 17:23:05 +0200
To: Plech¹míd Martin <Martin.Plechsmid@merlin.cz>, "'XForms'" <www-forms@w3.org>
> But first, the namespaces used in the xpath expressions have to be declared.
> Where am I to put the namespace declarations? On the root of the xforms
> document? (Of course, technically it is irrelevant, but conceptually, I'm
> not sure if this is the right place.) And I'm not even sure (as I haven't
> found it in the specification) whether the xpath expressions are understood
> to inherit the namespace declarations from the containing xforms document.

The namespace declaration has to be in scope for the element, whose attribute has the XPath expression. In your case, the <bind> and
<input> elements. If you place the declaration in the root of the document, the declaration will be in scope for every element.

XML Namespaces spec defines the namespace scoping rules, and XForms spec in
defines the evaluation context for the XPath expressions.

	Mikko Honkala
	XForms WG / X-Smiles developer
Received on Thursday, 28 March 2002 10:22:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:05 UTC