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/