XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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

Cecil

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:

http://docs.oasis-open.org/ubl/prd2-UBL-2.1/mod/summary/reports/UBL-AllDocuments-2.1.html#t-CommonLibrary-1246

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

http://docs.oasis-open.org/ubl/prd2-UBL-2.1/mod/summary/reports/UBL-AllDocuments-2.1.html#t-CommonLibrary-1262

Another example is PriceList:

http://docs.oasis-open.org/ubl/prd2-UBL-2.1/mod/summary/reports/UBL-AllDocuments-2.1.html#t-CommonLibrary-1409

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

http://docs.oasis-open.org/ubl/prd2-UBL-2.1/mod/summary/reports/UBL-AllDocuments-2.1.html#t-CommonLibrary-1413

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


--
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@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS