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

Re: SGML Inclusions and infinitive recursion (in XSLT)

Subject: Re: SGML Inclusions and infinitive recursion (in XSLT)
From: B Tommie Usdin <btusdin@xxxxxxxxxxxxxxxx>
Date: Mon, 5 Oct 2009 19:25:43 -0400
Re:  SGML Inclusions and infinitive recursion (in XSLT)
At 3:50 PM -0700 10/5/09, Don Smith wrote:
What I want to do is produce, for every element, not only what it's declared content model is (in DTDParse's output file, the content of <content-model-expanded>), but also of any inclusions that apply to the element. And that's where the problem is.

If I recall SGML inclusions correctly, an inclusion declared on an element applies to all child elements all the way to the bottom of the relevant part of the document tree.

1. An inclusion declared on an element applies to all child elements all the way to the bottom of the relevant part of the document tree UNLESS there is an exclusion at a lower level that over-rides the inclusion.


2. In models with inclusions and/or exclusions and elements that appear in more than one context (in other words, most real document models), it is not possible to specify what elements are allowed in another element; the answer is context-dependent. Imagine, for example, a document model with <footnote> included at the top level, and excluded on <footnote>. If <footnote> contains <paragraph>s and <paragraph>s are also allowed in other contexts, then some <paragraph>s are allowed to contain <footnote>s (those not in <footnote>s) and other <paragraph>s are not allowed to contain <footnote>s (those that are in <footnote>s. This is a very common situation in SGML models for prose documents.

Unless you are working with SGML that has inclusions but not exclusions (which is possible, I suppose), you will not be able to produce such a list unless it lists each element in each context. And sometimes the contexts may be many levels nested. (If <paragraph> can contain <list> which can contain <item> then, using the example above, <item> may contain <footnote> unless the <item> is inside a <footnote>, such as if it is in a <paragraph> that is in a <footnote>.

I started to write "I hope that helps", but I know that it doesn't.

Thank you for reminding me of one of the best things about the XML specification. And GOOD LUCK!

-- Tommie

--

======================================================================
B. Tommie Usdin                        mailto:btusdin@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================

Current Thread

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
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-2011 All Rights Reserved.