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>
Message-ID: <MOELJNHNHEHNIMLMBJKGMELOCAAA.honkkis@tml.hut.fi>
> 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
http://www.w3.org/TR/2002/WD-xforms-20020118/slice7.html#expr-eval
defines the evaluation context for the XPath expressions.

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:50 GMT