XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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 <jesper.tverskov@gmail.com>
To:         xml-dev@lists.xml.org
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: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php





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


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS