[Xpath-ng] Proposal for static context syntax
David Rosenborg
darolst at pantor.com
Wed Nov 27 04:01:28 MST 2002
Hi,
I propose that we have a module for specifying static context as follows:
The static context preamble appears before any other XPath Ng constructs.
Its purpose is to
* decleare namespace prefixes.
* possibly declare a default namespace for element names.
* declare function library identifiers to be used for unprefixed function names.
* declare function names to resolve possible function name conflicts.
Namespace declarations use the same syntax as in the RELAX NG Compact Syntax, i.e,
namespace foo = "http://example.org/ns/foo"
The default element namespace:
default namespace = "http://example.org/ns/my-element-ns"
With an optional prefix:
default namespace bar = "http://example.org/ns/my-element-ns"
The empty string can be used to declare a prefix for unqualified names
namespace local = ""
Function library import declarations must appear after any namespace declarations
and has two forms:
import xf:*
import math:*
import math:floor
The first form, prefix:*, declares that functions with the URI specified by the prefix
should be considered when looking up an unprefixed function name.
It's an error if more than one matching function is found during a lookup unless one
of the functions is explicitly imported using the second QName form.
Any thoughts?
Cheers,
David
More information about the Xpath-ng
mailing list