[Bug 29822] New: [SER31] Adaptive output method, xs:anyURI

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29822

            Bug ID: 29822
           Summary: [SER31] Adaptive output method, xs:anyURI
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
               URL: https://www.w3.org/XML/Group/qtspecs/specifications/xs
                    lt-xquery-serialization-31/html/Overview.html#adaptive
                    -output
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Serialization 3.1
          Assignee: cmsmcq@blackmesatech.com
          Reporter: tim@cbcl.co.uk
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The specification reads:

"An instance of xs:string or xs:untypedAtomic is serialized by enclosing the
value in double quotation marks and doubling any quotes within the value; or
optionally by enclosing the value in apostrophes and doubling any apostrophes
within the value. The resulting value is then serialized using the Text output
method described in 8 Text Output Method."

...

"An atomic value of any other type is serialized using the syntax of a
constructor function: xs:TYPE("VAL") where TYPE is the name of the primitive
type, and VAL is the result of applying the fn:string() function. For example,
xs:date("2015-07-17"). The resulting string is then serialized using the Text
output method described in 8 Text Output Method."

xs:anyURI isn't an xs:string, so it is handled by the final rule.  This means

xs:anyURI('"')

will be output as

xs:anyURI(""")

Personally, I'd like to see xs:anyURI be treated just like xs:string and
xs:untypedAtomic.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 14 September 2016 09:43:00 UTC