[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Is recursive markup good? bad? supported? not supported?

  • From: Cecil New <cecil.new@gmail.com>
  • To: "G. Ken Holman" <gkholman@cranesoftwrights.com>
  • Date: Sun, 11 Dec 2011 07:55:36 -0500

Re:  Is recursive markup good? bad? supported? not supported?

In the product data world a part hierarchy is naturally recursive, so xml of CAD structures and parts lists (multi level ) are recursive


On Dec 11, 2011 6:52 AM, "G. Ken Holman" <gkholman@cranesoftwrights.com> wrote:
OASIS UBL has some recursive structures, and that is a standard that is expected to be used by programmers accessing business document information (e.g. invoices, purchase orders, waybills, etc.) from XML.

One example is Party:


... which contains the child AgentParty, itself having the same type:


Another example is PriceList:


... which contains the child PreviousPriceList, itself having the same type:


I think you just didn't give enough time for people to respond, or people like me just assumed it was obvious that many schemas have to be recursive in order to reflect the information being modeled as a document structure.

People should be designing their XML around the inherent relationships of the information, and as you say "recursive markup is a natural fit to XML" but I would rather say "recursively-described information is natural in many domains".

If tools or technologies cannot accommodate the inherent relationships of the information, then perhaps users should patronize products that work properly.

I hope this helps.

. . . . . . . . . . . Ken

At 2011-12-10 11:53 +0000, Costello, Roger L. wrote:
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:element name="Title" type="xsd:string" />
                <xsd:element name="Body" type="xsd:string" />
                <xsd:element name="Section" type="SectionType" minOccurs="0" />

   <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?


Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/x/
G. Ken Holman                   mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@l....org
subscribe: xml-dev-subscribe@l....org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.