Re: [xml-dev] Why Use anyURI

From
Hermann Stamm-Wilbrandt <>
To
Jesper Tverskov <>
Date
2010-09-15T09:03:34Z
ID
<>
Thread
Re: [xml-dev] Why Use anyURI
> If it is all important to get some of the above validated, make a
> user-defined type based un xs:anyURI and restrict it with REGEX.
OK.
Would you want to take below regexp from rfc38986 for that?

From appendix A of rfc3986:
http://www.ietf.org/rfc/rfc3986.txt#line=2699
URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

http://www.ietf.org/rfc/rfc3986.txt#line=2809
      ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?

http://www.ietf.org/rfc/rfc3986.txt#line=2835,2839
      scheme    = $2
      authority = $4
      path      = $5
      query     = $7
      fragment  = $9


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
Fixpack team lead
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


From:       Jesper Tverskov <>
To:         
Date:       09/15/2010 10:53 AM
Subject:    Re: [xml-dev] Why Use anyURI



Indication of intent is often better than nothing: almost everything
goes but don't use @ unless as used in email address, don't use space
unless %20, don't use # unless it is a fraction identifier, don't use
?, &, =, unless querystring, etc, etc, and don't use anything but
ASCII unless it makes sense that it will work.

If it is all important to get some of the above validated, make a
user-defined type based un xs:anyURI and restrict it with REGEX.

Cheers,
Jesper Tverskov

http://www.xmlkurser.dk
http://www.xmlplease.com

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: 
subscribe: 
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php