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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Namespaces, Xml Schema Whitespace normalization, xs:anyURI

[ Lists Home | Date Index | Thread Index ]
  • To: lists@jeffrafter.com, "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Subject: Re: [xml-dev] Namespaces, Xml Schema Whitespace normalization, xs:anyURI, and URILiterals in XPath 2.0
  • From: Michele Vivoda <idmichele@yahoo.it>
  • Date: Wed, 29 Mar 2006 23:50:35 +0200 (CEST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.it; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Ke8iSPo/YhIBnksb1ETSUAbe7Uh/EogYeofmM7WiW6c/UsG08TZNZ+NsD+OB/LPaivxMDRs8LDlV4IWjgMMlXsWBWceCVbVFw6tC5u1+ATWB+Shj7j1OghmMHo2P+lkA8b5Wcpez/PyqkMNf7bGHCNkMz810eTdbZoFuVOqTRD8= ;
  • In-reply-to: <442AE14D.3030706@jeffrafter.com>


> > 
> > I am not sure if I want this uri 
> > to be reported as valid when doing
> > validation  of machine-written data 
> > ( like for example for the urls of a 
> > publishing system):
> > 
> > 1) http://www.example.org/c a/c%20b
> 
> Technically this is not a valid URI and therefore
> not a legal namespace 
> name. It is a valid xs:anyURI, though it is
> problematic. The reason it 
> is valid is because spaces are allowed lexically and
> validation is 
> performed against the value space (which is defined
> to be the lexical 
> value with the XLink algorithm applied). Now, the
> fact that XLink lumps 
> disallowed and excluded characters into one group
> and the algorithm 
> performs %hh escaping on the whole set is what
> creates this oddity I think.


I agree that the uri of the example is a valid
xs:anyURI following the specs. And also that
this might be problematic.

About the namespace name being an URI or 
an xs:anyURI or simply a string, I am not sure,
parsers will be ok with any not empty 
xml characters sequence as namespace "uri", 
right ?

I was thinking more to the case of 
xs:anyURI as base type for an URL type
like the href attribute of html, to give
the idea.


> 
> > When I am not so strict and I support 
> > the user with some uri escaping
> > I would like to help him when he types 
> > 
> > 2) http://www.example.org/c  a/
> > 
> > to be resolved 'correctly' to
> > 
> > http://www.example.org/c%20%20a/
> > 
> > (as for example windows explorer does)
> > 
> > and not to
> > 
> > http://www.example.org/c%20a/
> > 
> > may be I am missing something..
> 
> You would do this in your application-- before it
> was ever validated as 
> an xs:anyURI.


Isn't the schema supposed to stay between
the xml and my application ? I mean as user 
someone that writes an xml document,
for application I mean a program that uses the 
xml of the user together with a 
schema-enabled-processor that provides 
the program a datatyped value,
for example a number that can be summed or 
a space collapsed text etc.

For a form or an editor I agree that
url-encoding of characters should be
made by the (input) application.

I think a reasonable option
could be that the schema does not touch
the uri so that -is responsability  of the 
application to build the uri, maximum
that can be given is trimming-.
 
Otherwise I don't know how can help 
a validator that, if I have an url like this: 

<http://example.org/I%20have%20space>

tells me that these are all valid lexicals
representations of that url:

"http://example.org/I%20have%20space";
"http://example.org/I%20have space"
"http://example.org/I%20have  space"
"http://example.org/I%20have   space"


I cannot distinguish between a valid uri
like the first one and the others 
(with a space) that are really wrong. 

If is data coming from an other app,
I think there is something wrong with 
the application that produces uris like 
the last ones, but I cannot check it with
the schema, I have to do it my self 
when the schema tells me they are valid.

At the same time the only benefit that the
user has is to have the space character escaped,
all the other characters must anyway 
be escaped by him or his input application,
and also consecutive spaces.

May be there is some other use or apect
I am not aware of. I noticed now that both IE 
and Mozilla interperet this as valid url:

file:/D:/Music/bob/Catch%20A Fire


 Generally, the whitespace normalized
> value is not what you 
> deal with in an editor... you deal with the lexical
> value.
> 
> > Just to be clear: this should be a valid xs:anyURI
> > isn't it ? http://www.example.org/c a/c%20b
> > and when I 'map' it to an URI becomes
> > 
> > http://www.example.org/c%20a/c%20b
> > 
> > Right ?
> 
> If by "map" you mean apply the algorithm from XLink
> section 5.4, yes. 
> Note that this kind of "mapping" is not done to
> namespace URIs in 1.0 or 
> 1.1, so in theory you would never have a (legal)
> namespace that 
> contained space characters.

Legal for what ?

Greetings
Michele Vivoda




	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS