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: Re: Issue: processing of datatypeLibrary and ns attributes

The problem is that the value of the ns attribute in the schema is compared
against the namespace URI part of a name in the instance.  Suppose we have a
schema with

<element name="foo" ns="nice Kanji here">

and in the instance we have

<foo xmlns="nice Kanji here">

If the ns attribute in the schema is subject to UTF-8/%xx escaping, but the
namespace URI specified with the xmlns declaration isn't, then these won't
match.  However, the XML Namespaces Rec and XML Infoset do not specify that
namespace URIs should be subject this processing.  If the RELAX NG processor
does additional processing on namespace URIs in the instance, then that
causes another problem: we could have two attributes

<foo x:bar="" y:bar="" xmlns:x="nice Kanji here" xmlns:y="escaped(nice Kanji

where escaped(nice Kanji here) means the result of doing UTF-8/%% escaping
on "nice Kanji here". These would satisfy the constraints of the Namespaces
Recommendation, but as far as the RELAX NG processor was concerned we would
have two attributes with the same name!

My conclusion is that the RELAX NG processor should not do any
transformation on the value of the "ns" attribute before comparing it
against namespace URIs: it should be compared against namespace URIs exactly
as is.

In general, I would agree that users should use absolute URIs, or, more
precisely, they should use strings which after UTF-8/%xx escaping of
disallowed characters are absolute URIs plus optional fragment identifiers.
However, I don't see a lot of value in requiring a RELAX NG processor to do
validate this. Thus I would be inclined to say that RELAX NG schemas should
use absolute URIs (as defined above), but that RELAX NG processors must
accept arbitrary strings.

For the datatypeLibrary attribute, we have more of a free hand, but I think
it's simplest to treat it the same as the ns attribute.

----- Original Message -----
From: "Murata Makoto" <mura034@attglobal.net>
To: <relax-ng@lists.oasis-open.org>
Sent: Monday, July 02, 2001 8:33 PM
Subject: Re: Issue: processing of datatypeLibrary and ns attributes

> James Clark wrote:
> > What processing if any should be done on the datatypeLibrary and ns
> > attributes? These are defined as URIs. What parts of normal URI
> > should be applied to these:
> >
> > (a) UTF-8/%xx escaping of disallowed characters as specified for the
> > datatype
> Yes.
> > (b) resolution of relative URIs per XML base
> I would like to allow absolute URIs only.
> > (c) parsing against RFC 2396 syntax
> If we validate a RELAX NG grammar against a meta grammar, we have to
> do that.  But if we merely validate instances against a RELAX NG grammar,
> I don't think this parsing is necessary.
> Cheers,
> Makoto
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: relax-ng-request@lists.oasis-open.org

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

Powered by eList eXpress LLC