W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2005

[Bug 1624] New: can type definitions be recursive?

From: <bugzilla@wiggum.w3.org>
Date: Fri, 15 Jul 2005 01:17:59 +0000
To: public-qt-comments@w3.org
Message-Id: <E1DtEpz-0000fp-Cv@wiggum.w3.org>


           Summary: can type definitions be recursive?
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: fred.zemke@oracle.com
         QAContact: public-qt-comments@w3.org

2.4.4 Top level definitions
Are recursive types permitted?  I don't see a prohibition, and it
seems that they are necessary to define certain types, for example,
the ability to have an arbitrary binary tree in XML would 
require a type such as 

define type node as { (element left of type node, 
                       element right of type node) ? }

It would be good to state this explicitly.  
On the other hand, setion 8.1.1 "Derived from" under "Note"
second sentence says "...no cycles are allowed in derivation by
restriction or extension".  It would be good to include this
prohibition in section 2.4.4.

Note, though that the definition of xs:anyType in section 3.5.1
is recursive and is a definition by restriction (it says that
xs:anyType is a restriction of itself).  This example 
contradicts the prohibition on cycles in derivation by restriction.
Perhaps the prohibition should be worded, "Except for the definition
of xs:anyType, cycles are not permitted in definition by 
restriction or extension".
Received on Friday, 15 July 2005 01:18:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:25 UTC