Re: Problem with the document() function

Subject: Re: Problem with the document() function
From: Michael Fuller <msf@xxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Feb 2000 08:52:15 +1100
Didier wrote:
> I have found the fix which is to explicitly define the default name
> space and refer to elements with the explicitly defined name space.
> 
> I mean that, if the document to be processed has a default name space (ex:
> xmlns="http://www.w3.org/1999/xhtml";), this latter has to be defined as
> xmlns:html="http://www.w3.org/1999/xhtml"; and the member of the html name
> space referred with the html prefix.

Question: was the failure with default-namespace attributes or
elements?

I presume the former, in which case the "failure" was probably
correct[1] behaviour given that:
  "Note that default namespaces do not apply directly to attributes."
  [_Namespaces in XML_, http://www.w3.org/TR/REC-xml-names/, sec. 5.2, para 1.]

A perennial topic of discussion on XML-DEV: attributes and default
namespaces :-(! Anyway, the bottom line is that you can use default
namespaces for elements, but not for attributes...

If it was default-namespaced _elements_, then it was simply a bug,
either in your stylesheet/documents or in XT.

> I was too tired to notice it.

Don't sweat it. _Everyone_, I suspect, gets bitten by namespaces in
general and attribute namespaces in particular, sooner or latter.

Anyone for architectural forms? ;-)

Michael

[1] but questionable ;-)


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread