[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Can XML documents have loops (cycles)?
Hi Folks, Chris Burdess wrote: > This is a representation of a cyclic graph in some vocabulary > not defined within the scope of XML, but the XML document > itself is not a cyclic graph, is it. My XML parser can parse the > XML just fine without having to worry about falling into an > infinite loop. Below is an XML document. It conforms to the XML specification. It is well formed and valid. It's ID/IDREF values form a loop (cycle). The loop is formed using only stuff specified in the XML specification. So, why can't XML documents have loops (cycles)? Why doesn't an XML parser have to worry about falling into an infinite loop? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Graph [ <!ELEMENT Graph (Node)+> <!ELEMENT Node EMPTY> <!ATTLIST Node id ID #REQUIRED idref IDREF #REQUIRED> ]> <Graph> <Node id="_1" idref="_2" /> <Node id="_2" idref="_1" /> </Graph> /Roger
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|