- From: <bugzilla@wiggum.w3.org>
- Date: Fri, 15 Jul 2005 01:17:59 +0000
- To: public-qt-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=1624
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