<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28948</bug_id>
          
          <creation_ts>2015-07-14 22:52:32 +0000</creation_ts>
          <short_desc>[QT3TS] K2-Serialization-29: whitespace in option declarations</short_desc>
          <delta_ts>2015-07-16 15:59:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3.1</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>john.snelson</cc>
    
    <cc>josh.spiegel</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>122044</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-14 22:52:32 +0000</bug_when>
    <thetext>Test K2-Serialization-29 tests that leading and trailing whitespace is permitted in option declarations, e.g.

declare option output:indent &quot;    yes    &quot;;

and assumes that it is permitted. But I can&apos;t see anything in the spec that allows one to assume this. Certainly in the serialization parameter file, the schema derives the yesNo type as an enumeration restricting xs:string, and xs:string does not normalize whitespace.

Another example is

declare option output:method &quot;  Q{}xml&amp;#x9;&quot;

The spec is clear that character references are allowed and that EQName syntax is allowed, but there&apos;s nothing that explicitly allows the whitespace. The EQName syntax itself doesn&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122046</commentid>
    <comment_count>1</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-07-14 23:06:34 +0000</bug_when>
    <thetext>Isn&apos;t yesNo a restriction on token?

  &lt;xs:simpleType name=&quot;yes-no-type&quot;&gt;
    &lt;xs:restriction base=&quot;xs:token&quot;&gt;
      &lt;xs:enumeration value=&quot;no&quot;/&gt;
      &lt;xs:enumeration value=&quot;yes&quot;/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

And as I recall, method is a union type that includes xs:string.  So I suppose &quot;  Q{}xml&amp;#x9;&quot; would be a string.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122047</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-15 01:24:07 +0000</bug_when>
    <thetext>&gt;Isn&apos;t yesNo a restriction on token?

So it is. I had been looking at other parameters, e.g. method and encoding, that are defined as restrictions from xs:string, and somehow assumed they would all be the same.

I think we need to sort out the inconsistency.

Also the fact that the option parameter declaration allows EQNames but the schema doesn&apos;t.

Changing this to a spec bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122048</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-15 01:31:57 +0000</bug_when>
    <thetext>The schema for the method type says it is a union between an xs:string enumeration of the six specific values xml, html, text, json, etc, and xs:QName retricted to contain a colon. When two branches of a union have different whitespace facets, you have to apply different whitespace normalization rules when testing against each branch of the union (IIRC). So value=&quot;xml&quot; doesn&apos;t allow whitespace, but value=&quot; my:method &quot; does. And when it comes to 

declare option output:method &quot; Q{uri}method &quot;;

your guess is as good as mine, because it&apos;s not in the schema at all. Oh, these sordid details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122152</commentid>
    <comment_count>4</comment_count>
    <who name="John Snelson">john.snelson</who>
    <bug_when>2015-07-16 15:59:46 +0000</bug_when>
    <thetext>DECISION: Change the schema to collapse whitespace in all cases except where WS is significant (ie: item separator). Restore the equivalence of option declarations and parameter documents by also allowing EQNames in the parameter document.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>