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

Re: DOCTYPE misunderstood

  • From: Peter@u... (Peter Murray-Rust)
  • To: xml-dev@i...
  • Date: Fri, 09 May 1997 09:15:46 GMT

header xml
In message <dc9jLEA+jsczEw38@l...> Richard Light writes:
[...]
> 
> I've been thinking about the issue of what comes at the head of an XML
> document.  This may be stating the obvious, but ...
> 
> While it would be generally agreed that you can't gratuitously stick any
> old <!DOCTYPE header onto a piece of well-formed XML, I think there is a
> case for architecting XML so that you _can_ hold the naked XML without
> _any_ header information, and prepend both DOCTYPE and style processing
> instructions at delivery time.
> 
> One reason is that you might want to author a document in chunks, and
> either publish/work with the chunks in their own right, or put those
> chunks together via a 'master document' containing lots of entity
> references to pull the chunks in.  For the first purpose, the free-
> standing chunks will require a DOCTYPE header, not least so you can
> create them in a structured XML-aware editor.  For the second purpose,
> they need to be 'naked', since you can't pull in an entity with a
> DOCTYPE at the beginning, and we don't have the SMGL SUBDOC facility in
> XML.

This is a problem I have come up against, and still concerns me.  I would like
to encourage authors to create documents in small reusable chunks, the 
question being whether we use a construction like:

<!DOCTYPE CML [
<!ENTITY chunk1 SYSTEM "chunk1.cml">
... etc...
]>
<CML>
...
&chunk1;
</CML>

with the chunks (say) being:
<MOL>
...
</MOL>


or whether we use something like

<!DOCTYPE CML [
<!ENTITY mini1 SYSTEM "mini1.cml">
]>
<CML>
<XLIST XML-LINK="EXTENDED">
<XVAR XML-LINK="LOCATOR" ACTUATE="AUTO" SHOW="EMBED" HREF="&mini1;"></XVAR>
</XLIST>
</CML>

with mini1.cml being:

<!DOCTYPE CML>
<MOL>
...
</MOL>

Now, I wrote this latter on the fly, and it looks horribly clunky and it's
much more difficult to implement.  And is it *legal*? and will it do
what I want?  The advantage is that the mini version can be used in its
own right and we know what language it's in.  Chunks like:

<A>Foo
<B>Bar</B>
</A>

do not carry their DTD and also unwanted whitespace could easily creep in.
Constructions like:

<A
>Foo<B
>Bar</B
></A
>

might solve some, but not all of the whitespace problem.

Since this must be a Well Investigated Problem, insight would be useful.

	P.

-- 
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


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.