Re: defaulting namespace attributes with relative URI references

> If a namespace for a document is defined in a DTD rather than in a
> document, using attribute defaulting, how should relative URI references be
> absolutized?  Using the DTD's base URL?  Or the document's base URL?

Good question!

Well if this is to be layered over an XML 1.0 parser (not sure that it
is?) then the xmlns attribute and its default are just a CDATA attribute
so effectively will get copied as such to the elements coming from the
document instance. Seeing as these elements might be in entities with
different base URI that means that in the absolute interpretation
the elements with the same XML name in different entities in the
document will have different expanded names in the namespace view.

If you decide that the DTDs base URI should be used (somehow) then
you have the fun deciding what is the base URI is for a DTD found
via a PUBLIC identifier. (Obviously any given application knows
which copy of the DTD it used, but it means the namespaces used in the
document depend on the application used to query the document, which
is a bit odd.) Or perhaps you would use the base uri from the system
identifier, even if the dtd actually read was located using the public
id, but that is probably against some axiom or other.

David

Received on Friday, 2 June 2000 14:18:51 UTC