[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: "Cox, Bruce" <Bruce.Cox@USPTO.GOV>
  • To: "Costello, Roger L." <costello@mitre.org>, "xml-dev@l..."<xml-dev@l...>
  • Date: Tue, 13 Dec 2011 12:00:11 -0500

RE: Is recursive markup good? bad? supported? not supported?
Although the replies so far don't bear this out, I've found over the years that developers and users tend to be afraid of recursion.  Failing to use it when appropriate, though, leads to frustration when the limits designed into the hierarchy are exceeded, and extra costs when the schema has to be expanded to accommodate that.

We looked through a year's worth of patent text and found that two layers of superscripts were used very rarely, but they did occur.  So, we've defined two levels, Sup and Sup2, for general text.  For equations, we use MathML; I presume everyone is comfortable with whatever level of recursion that permits.

In patent claims, we have a structure "ClaimText" that is recursive, capturing the hierarchical nature of claim steps.  Abstractly, these are just nested paragraphs with certain limitations on content type based on patent rules.  Placing a limit on recursion of ClaimText would be tantamount to possibly preventing the correct description of an invention, so we don't do that.

Our first attempt at a patent authoring tool captured indent levels in a word processor and then used those levels as attributes on paragraphs.  The developers much preferred the recursive ClaimText; they said it reduced the complexity and amount of code needed to correctly capture the hierarchy.

Bruce B Cox
OCIO/AED/Software Architecture and Engineering Division
571-272-9004


-----Original Message-----
From: Costello, Roger L. [mailto:costello@mitre.org] 
Sent: 2011 December 10, Saturday 06:53
To: xml-dev@lists.xml.org
Subject: Is recursive markup good? bad? supported? not supported?

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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.