[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Is recursive markup good? bad? supported? not supported?
- From: "Costello, Roger L." <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Sat, 10 Dec 2011 11:53:08 +0000
Hi Folks,
There doesn't seem to be a lot of people using recursive markup - I received only two examples of schemas containing recursive definitions.
Why is there such limited use of recursive markup?
It seems to me that recursive markup is a natural fit to XML.
Many things are naturally recursively defined, e.g.,
A section consists of a title, body, and optional section.
That is easily expressed in XML Schema with a recursive definition:
<xsd:complexType name="SectionType">
<xsd:sequence>
<xsd:element name="Title" type="xsd:string" />
<xsd:element name="Body" type="xsd:string" />
<xsd:element name="Section" type="SectionType" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Section" type="SectionType" />
In fact, a non-recursive definition would be quite difficult.
Recently I heard someone say this:
Recursion in XML Schemas is definitely a bad idea, as it can
cause problems with XML Schema validators/data binding tools.
I don't know what problems recursive definitions cause to XML Schema validators, do you?
What data binding tools support recursive definitions? What data binding tools do not support recursive definitions?
What is your assessment of recursive markup?
/Roger
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]