[xquery-talk] When to us xs:string or xs:anyURI ?

Andreas Mixich mixich.andreas at gmail.com
Tue Apr 16 19:24:25 PDT 2019


Hello,

I wonder, what dis/advantages it would have to use the xs:anyURI
datatype for IRIs
instead of xs:string. Looking around, it seems, that most people do not
care for
the xs:anyURI and use xs:string instead, since that is easier to handle
(type casting works only one-directional with xs:anyURI).

What was the rationale behind creating an xs:anyURI datatype?
According to http://www.datypic.com/sc/xsd/t-xsd_anyURI.html

  [...]The only values that are not accepted are ones that make
inappropriate
  use of reserved characters, such as ones that contain
multiple |#| characters
  or have |%| characters that are not followed by two hexadecimal
digits.[...]

As XQuery users, what would you prefer in a module library for
functions, that take
or return IRIs? What would you expect in a module library, that acts as
a "swiss army
knife" for IRIs?

-- 
Goody Bye, Minden jót, Mit freundlichen Grüßen,
Andreas Mixich



More information about the talk mailing list