This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1624 - can type definitions be recursive?
Summary: can type definitions be recursive?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows 2000
: P2 minor
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-15 01:17 UTC by Fred Zemke
Modified: 2007-01-16 17:28 UTC (History)
0 users

See Also:


Attachments

Description Fred Zemke 2005-07-15 01:17:59 UTC
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".
Comment 1 Jerome Simeon 2005-07-19 17:01:09 UTC
I believe this is editorial. We should refer to the rules for this in
XML Schema.
- Jerome
Comment 2 Jerome Simeon 2006-04-13 19:08:40 UTC
Added a sentence in that Section to indicate that recursive types can be defined, according to the result specified in XML Schema.
- Jerome