On ven, 2005-08-05 at 15:32 +0100, [EMAIL PROTECTED] wrote:
> Over on the atom list, there is great debate on whether or not
> <tag>http://example.com</tag>
> and
> <tag>
> http://example.com
> </tag>
>
> are the same.
>
> The Atom 1.0 spec is quite on the subject,
> jing happily validates either agains anyURI
> http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html#rfc.section.4.2.6
>
>
> yet according to the rfc, whitespace is not allowed
> in URI content.

W3C XML Schema is quite clear that both are valid... The underlying
assumption is that application will normalize spaces (like the XPath
normalize-space function would do) before using any value that is from a
datatype that strip spaces.

If you agree with this assumption, that means that the value doesn't
need to be a valid URI before normalization....  If not, use another
type!

Also note that this isn't the only difference between the RFC and the
datatype:

The ·lexical space· of anyURI is finite-length character sequences
which, when the algorithm defined in Section 5.4 of [XML Linking
Language] is applied to them, result in strings which are legal URIs
according to [RFC 2396], as amended by [RFC 2732].

http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI

Also, well known URIs (including WEBDAV) wouldn't be valid according the
RFC and (all|some)? implementations have relaxed these conditions:

http://lists.oasis-open.org/archives/relax-ng/200111/msg00033.html

Eric

> Is it possible to constrain the element such that
> whitespace would be flagged as invalid?
>
> regards DaveP
>
>
>
>

> Yahoo! Groups Links
>
>
>

>
>
>
--
Weblog:
                 http://eric.van-der-vlist.com/blog?t=category&a=English
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



YAHOO! GROUPS LINKS




Reply via email to