<?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>14840</bug_id>
          
          <creation_ts>2011-11-16 11:28:54 +0000</creation_ts>
          <short_desc>[XDM 3.0] Function types in the type hierarchy diagram</short_desc>
          <delta_ts>2012-02-20 13:39:31 +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>Data Model 3.0</component>
          <version>Recommendation</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="Norman Walsh">ndw</assigned_to>
          <cc>jim.melton</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>60067</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-11-16 11:28:54 +0000</bug_when>
    <thetext>The type hierarchy diagram used in both XDM and F+O shows the type

function(item()*) as item()*

with four (example) subtypes, namely

function(item()*) as item()
function(item()*) as item()?
function(item()*) as item()+
function(item()) as item()

This is incorrect. (function(P) as Q) is a subtype of (function(R) as S) if R is a subtype of P and Q is a subtype of S. Therefore the last of these four illustrative subtypes is correct.

I&apos;m not a graphical kind of person, so I will leave the correction of this to someone else. I have always thought the whole diagram highly misleading. Even its title is wrong, since our types form a lattice rather than a hierarchy. My vote would be to remove it entirely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60068</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-11-16 11:30:07 +0000</bug_when>
    <thetext>Therefore the last of these four illustrative subtypes is correct.

s/correct/incorrect/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60336</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2011-11-22 07:48:29 +0000</bug_when>
    <thetext>Thanks for this bug report.  I am the person stuck with updating the type hierarchy diagram(s), so I need to better understand your report.  Are you suggesting that the entire collection (of three) type hierarchy diagrams should be omitted from the documents, or that only a part of diagram 1 should be omitted?  I think you mean the latter, but it&apos;s not quite clear to me. 

If it&apos;s only the part of diagram 1 that deals with function items, I would be grateful for your guidance about what should be done with the fact that function(*) is, in fact, a kind of item, and that it has a great many subtypes.  Depending on the extent of the changes you might suggest to the part of diagram 1 dealing with function items, I may be able to handle it editorially. 

If your suggestion is to eliminate one or all of the diagrams, then I believe that a WG decision is required. 

If you wish to change the title either of diagram 1 only or of all diagrams to replace the word &quot;hierarchy&quot; with &quot;lattice&quot; or something similar, I also believe that a WG decision is required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61022</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-12-06 15:38:01 +0000</bug_when>
    <thetext>Specific suggestions. This affects the &quot;first diagram&quot; in F+O section 1.5.

Intro: &quot;The first diagram and its corresponding table illustrate the &quot;item&quot; type hierarchy. In XDM, items include node types, function types, and built-in atomic types.&quot;

* delete the quotes around &quot;item&quot;.

* replace &quot;heirarchy&quot; by &quot;lattice&quot;

* add the sentence: The types form a lattice because in the relationship expressed by the function derives-from(A, B), a type may be derived from more than one other type. For example, function(xs:string, xs:string) as xs:int is derived from (that is, substitutable for) both function(xs:Name, xs:Name) as xs:int and function(xs:NMTOKEN, xs:NNTOKEN) as xs:int. Equally, an atomic type A is substitutable for both union(A, B) and for union(A, C).

* add the qualification: The diagram does not attempt to illustrate the relationships of union types, and only gives a few illustrative examples of function types&quot;.

In the diagram:

* change XDM 1.1 to XDM 3.0

* In the stack of four (green) functions with a common parent, delete the fourth.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61040</commentid>
    <comment_count>4</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2011-12-06 18:48:11 +0000</bug_when>
    <thetext>In comment 3, two items affect the diagram itself:

In the diagram:

* change XDM 1.1 to XDM 3.0

* In the stack of four (green) functions with a common parent, delete the
fourth.

I had previously changed &quot;XDM 1.1&quot; to &quot;XDM 3.0&quot; (be sure to update your local CVS directories, including .../qtspecs/specifications/images/).  I have deleted the fourth green function box (and slightly shortened the line to which it was attached). 

NOTE: I did *not* change the title of the diagram to replace the word &quot;Hierarchy&quot; with &quot;Lattice&quot;, but wonder if that change should be made.  If so, I&apos;m happy to make that additional change. 

I presume that Mike, as F&amp;O editor, will make the changes specific to the F&amp;O spec, although I&apos;m happy to make them if he prefers.

QUESTION: Should corresponding changes be made to the XDM 3.0 spec as well?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62569</commentid>
    <comment_count>5</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2012-01-11 19:32:26 +0000</bug_when>
    <thetext>At their joint teleconference on 2012-01-10, the WGs decided not to change the title of the diagram (see the NOTE in comment 4), and decided that the text of XDM 3.0 should be changed corresponding to the changes made to F&amp;O 3.0 described in the comments on this bug.  I am not marking the bug RESOLVED yet, pending completion of the changes to XDM 3.0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64302</commentid>
    <comment_count>6</comment_count>
    <who name="Norman Walsh">ndw</who>
    <bug_when>2012-02-20 13:39:31 +0000</bug_when>
    <thetext>Fixed in DM.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>