[
Lists Home |
Date Index |
Thread Index
]
- From: "Rick Jelliffe" <ricko@allette.com.au>
- To: "James Clark" <jjc@jclark.com>
- Date: Tue, 21 Dec 1999 14:42:31 +0800
From: James Clark <jjc@jclark.com>
>Rick Jelliffe wrote:
>>
>> From: James Clark <jjc@jclark.com>
>>
>> >I do indeed want that, and in the past I've argued against
*requiring*
>> >processors to provide information about the prefix used. I've become
a
>> >lot less negative about this prefix information recently and I think
>> >it's better for an API to provide it
>>
>> Isn't it a requirement for XSL?
>
>No. XSL requires only information about what namespace declarations
are
>in scope, not what prefix was actually used.
Sorry for being thick: are you using "namespace declaration" here to
mean
that each use of a namespace should point to its declaration rather than
just
to the simple namespace URI? I strongly agree.
It seems like we need to get away from the idea that two namespace
objects
are equal if their URI strings are equal. Either we need to know the
address of the definition of the object (in languages that support this)
or
the object also needs to have some definition-occurrence indicator:
this could be an identifier or a position on a stack. (If it is an
indentifier
then I think the prefix would do fine.)
For other people, the issue comes up in XSL, where one can have
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
>
...
<xsl:template match="/">
<axsl:value-of select="xxx"/>
</xsl:template>
</xsl:stylesheet>
In this document, the axsl: element will not be interpreted
as an XSLT function by an XSL processor: it will be output
unchanged as
<axsl:value-of select="xxx"/>
So an API that resolves namespaces cannot merely replace
the prefix with the URI and the suffix:
<(http://www.w3.org/1999/XSL/Transform)stylesheet
version="1.0"
>
...
<(http://www.w3.org/1999/XSL/Transform)template match="/">
<(http://www.w3.org/1999/XSL/Transform)value-of select="xxx"/>
</(http://www.w3.org/1999/XSL/Transform)template>
</(http://www.w3.org/1999/XSL/Transform)stylesheet>
because that loses the scope.
B.T.W., I cannot see how this can be reconciled with the current
information set Last Call draft (which seems to drop the prefix).
I think it means that any API that simply drops the prefix (or
scoping information in liu of the prefix) is incorrect.
Rick Jelliffe
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|