Expanded names are not enough
James Clark
jjc at jclark.com
Thu Aug 6 06:05:43 BST 1998
Peter Murray-Rust wrote:
> B: Much of the current namespace spec is about minimisation. The prefix
> acts as a minimisation device. Scoping acts as a minimisation device. The
> SAX interface can expand minimised parts of a document to full
> UniversalNames (however held). The actual syntax of minimisation should be
> irrelevant to the application, i.e.:
> which prefix was used
> whether a namespace was default or not
> whether a prefix was implicit through scope
>
> (The only reason for the application receiving the prefix would be that it
> wished to be able to transform the document using the same prefix).
There's another reason why an application may need to know about
prefixes. It may be part of the application semantics that some part of
an attribute value or of the content of an element is to be interpreted
as a qualified name using the namespace declarations in effect for that
element.
For example in an XSL stylesheet an element representing a rule can
contain an attribute value with a string such as "ns:foo" with the
semantic that this rule matches an element in the source of a type which
has a local name "foo" and a URI equal to the URI in effect for the
prefix "ns" on the rule element in the stylesheet.
This means that a parser that wishes to support this kind of application
needs, in addition to exposing the expanded names of element types and
attributes, to make available for every element the namespace prefix to
namespace URI mapping in effect for that element.
James
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list