[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Is recursive markup good? bad? supported? not supported?
- From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Sun, 11 Dec 2011 06:50:15 -0500
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
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]