In the standard function library we adopted the approach that for input parameters, relevant functions should accept xs:string; for function results, they should return an xs:anyURI. That recognizes the one-way casting effect.
xs:anyURI is a bit of a mess. XQuery supports it only because it already existed in XSD. Michael Kay Saxonica > On 17 Apr 2019, at 03:24, Andreas Mixich <[email protected]> wrote: > > 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 > > _______________________________________________ > [email protected] > http://x-query.com/mailman/listinfo/talk _______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
