Re: URI References and context of use

What is useful is to have different operations on anyURI
(to use the XML Schema name), so that people wanting to
do different things with it can do what they want.
But creating different types would be wrong. Context,
especially in this case, is more often given by usage
rather than by the type itself. Stretching things a bit,
what you are proposing is similar to proposing different
types for integers that need to be added and those
that need to be multiplied.

On the contrary, for the integer/string example below,
and even more so for other cases (anyURI/string definitely
being one), one can actually argue that creating (completely)
types is a bad thing, that it would have been easier if e.g.
anyURI would have been a subtype of string. That would make
it much easier to use various string operations directly on
anyURI. Of course, XML Schema doesn't care that much about
operations, but others (e.g. XML Query) do.

Regards,    Martin.

At 23:32 03/01/25 -0800, Mark Nottingham wrote:

>XML Schema is gathering requirements for 1.1.
>
>Question: should a new type be considered, in order to distinguish URIs
>used as identifiers from those used as locators?
>
>In other words - these are very different elements:
>    <foo type="xsd:integer">0123</foo>
>    <foo type="xsd:string">0123</foo>
>and it's clear what's going on. However, schema has no way to distinguish
>URIs that are used as identifiers (e.g., in namespaces) from those that
>are to be used to locate (dereference).
>
>It strikes me that this would be useful*, because other specifications
>could use this mechanism to clearly communicate what the context of the
>URI is. It would also give guidelines to canonicalization, comparison,
>etc.
>
>Regards,

Received on Thursday, 30 January 2003 12:18:05 UTC