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

Re: Newted XML Documents

Subject: Re: Newted XML Documents
From: Gregory Propf <gpropf@xxxxxxxxxx>
Date: Sun, 20 Apr 2003 16:22:12 -0400
Re:  Newted XML Documents
Jack Cane wrote:
Suppose I am writing a book of many chapters each of which may have sections
and subsections. To keep things under control I propose to use included
files. Thus, the main file will have "book" as the root element and will
include chapter files.

Each chapter file will have "Chapter" as its root element, and will have one
or more section files included in it.

Section files will have subsections, etc.

So, my vision is of a nested set of included files.

Will XML support this?



Yes, This is how I did it. I have a file called docroot.dtd like this

<!ELEMENT docroot (#PCDATA)>
<!ENTITY doc1 SYSTEM "foo.xml">
<!ENTITY doc2 SYSTEM "bar.xml">


I have an xml file called docroot.xml



<?xml version="1.0"?> <!DOCTYPE docroot SYSTEM "docroot.dtd"> <docroot> &doc1; &doc2; </docroot>


The & is the include statement that refers to the entities defined in the DTD. I think there may be a way to do this with XSD stylesheets as well. I think that is the preferred way nowadays as dtds are considered antiquated. Still this method does work.



--
"Firing people can give you a pretty good buzz, but it's a poor, poor substitute for killing. I realize that now" - Dale Gribble



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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