[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 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: 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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|