Altova Mailing List Archives


(off-topic) Re: Recursive Children?

From: Rick JELLIFFE <ricko@--------.--->
To:
Date: 8/1/2000 10:13:00 AM
Kay Michael wrote:
> 
> > Does anyone know if (and how) I can have one element contain itself?
> 
> No, you can't, but you can have one element contain another element of the
> same name, e.g.
> <section><section></section></section>
 
In SGML you could, potentially.  (I hope ISO 8879 said this is an error
:-)

Given the declaration
 <!ATTLIST x
     id ID #IMPLIED
     refid IDREF #CONREF >
you could attempt
  
 <x  id="x1"  refid="x1" >

where #CONREF means "if this attribute is used, the contents of the
element being pointed to can be taken as the contents of this element
(which cannot have any contents if #CONREF is specified)".  That allowed
SGML to specify many-to-one relationships on "children", but it wasn't
used much because most SGML was stream-processed.

Rick Jelliffe

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.