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

Re:DTD Design


recursive dtd
[Harvey Morcom]
 >We are in the early stages of moving our existing information into XML and I
 >am starting to look at the DTD and was after some advice.

 >It was initially proposed that we use the format SubSection(n), however this
 >limits the number of  sub-sections the document can have. I proposed the use
 >of a generic section element which will remove this. Which approach is
 >better?

Explicitly named sub-section elements simplify certain types of XML processing
and complicate others.

They simplify various navigation and location operations owing to the explicit
nature of the levelling. However, they complicate generic "section 
handling" owing to
the explicit nature of the levelling. e.g. there are times when you wants 
to say
"sections at any level" and end up having to write "sect1|sect2|...".

Most of the time I opt for a generic recursive levelling construct and utilise
the hierarchical context (ancestors) to deduce levelling depth.

Sometimes however, for human exposure, I use explicit levelling as it
is much easier to visually match up the tags to get your nesting right.
(Very useful for example in legislation example where nesting
can get quite deep.).

Where possible. I cross-translate to explicitly numbered sectioning for
author/edit and cross-translate back to generic recursive for CMS
storage and down-stream processing.

Old-timers on the list will remember the RANK feauture of SGML which
allowed a single element type declaration to infer the creation
of a familiy of numbered elements types. So you could declare
SECT and have tagging for SECT1, SECT2, SECT3 etc.


I hope this helps,


http://seanmcgrath.blogspot.com



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.