OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Use of QNames

Eric van der Vlist wrote:
> Before discussion list of simple data types, I'd like to raise the
> question of the usage of a namespace prefix in a value:
> <element name="number" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
>   <data type="xsd:integer"/>
> </element>
> I think this construct isn't clean since it's creating a relation
> between a namespace prefix and the content of an attribute.

Why do you think it's not clean for the content of an attribute to
depend on a namespace declaration?

> I know that it has been used by a number of applications, including XSLT
> (but there, the context was different since the namespace declaration
> was already needed for the literals) and W3C XML Schema.

I don't follow you here.

> Without starting a long rant, I think that, in the case of W3C XML
> Schema, this is an error and that we shouldn't be following them.
> I would rather use something like:
> <element name="number">
>   <data type="integer" role="http://www.w3.org/2000/10/XMLSchema" />
> </element>
> (or type-system instead of role ?)

TREX already allows:

 <data type="integer" ns="http://www.w3.org/2000/10/XMLSchema"/>

This is not the only case where TREX allows names qualified by a
namespace prefix.  They are also allowed in the

- name attribute of element
- name attribute of attribute
- name element

I regard this as an essential feature of TREX for working with patterns
that mix multiple namespaces.  Having to specify the namespace URI
repeatedly over the place is very error-prone: namespace URIs can be
long and it's easy to make a typo; if you do make a typo, TREX can't
detect that; the pattern would simply fail to match the documents that
you thought it would.  I think it's very important to be able to define
each namespace URI once, and then reference that definition.  XML
namespaces allows this and we should too.  I believe removing QNames
from TREX would significantly reduce ease of use.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC