[
Lists Home |
Date Index |
Thread Index
]
On Tue, Apr 09, 2002 at 07:57:49PM +0200, james anderson wrote:
>
>isn't any application better off processing the specialized values in
>the parser's dynamic context than trying to resolve the conflicts
>inherent in dragging that context around indefinitely? from the
>descriptions which i have seen, the status of such values is known at
>the point where they are parsed. are there cases where that is not true?
Why does it matter? You can't change the value of "3 + my:function()" below
to "3 + {some.uri}function()", if only because the expanded-name format
isn't understood. The parser, which shouldn't have to muck around examining
the content of attributes in order to determine whether they contain
information that is structurally dependent, is forced to preserve namespace
prefixes (which are supposed to not matter) because namespace declarations
bleed over into the content.
Here's a proposal for XML 1.1 + Namespaces 1.1: namespace declarations are
decreed not to apply to attribute or element content (listen for the
screams). An application that wants something of that sort gets to invent
its own attributes or elements to create the definitions, if it wants to
store QNames in element or attribute content.
>Michael Kay wrote:
>> The problem is that you don't know which namespaces are used, because
>> namespace prefixes can be used undetectably in content.
>>
>> <xsl:value-of select="3 + my:function()" xmlns:my="some.uri"/>
>>
>> If we had made it absolutely clear in the first place that namespace
>> prefixes could be used ONLY in element and attribute names, then we would
>> never have got into this mess. The solution adopted in the InfoSet model
>> (which got it from XPath) decided the opposite: that namespace prefixes were
>> significant and could be used anywhere they were in scope. Which works, but
>> brings its own set of problems.
Amy!
--
Amelia A. Lewis amyzing@talsever.com alicorn@mindspring.com
What's the end of a story? When you begin telling it.
-- Ursula K. Le Guin
|