<!DOCTYPE XSchema SYSTEM "xschema.dtd" [
<!ENTITY bar.default "plugh">
]>
<ElementType id="foo">
<Attribute id="bar">
<Type>CDATA</Type>
<Default>&bar.default;</Default>
</Attribute>
</ElementType>
I am not an XML/SGML theorist, but it seems to me that anything that PEs
can do for DTDs can be mirrored by entities in XSchemata. This extends to
content specs, and - this could be exciting - namespaces. Watch:
<!DOCTYPE XSchema SYSTEM "xschema.dtd" [
<!ENTITY cml "CML:">
]>
<ElementType id="&cml:mol">
<ContentSpec>
<Seq optional="no" repeatable="no">
<ElementType>&cml;atoms</ElementType>
</Seq>
<Seq optional="yes" repeatable="no">
<ElementType>&cml;bonds</ElementType>
</Seq>
</ContentSpec>
</ElementType>
To me this looks as if we can create our DTDs to be namespace-aware and -
if necessary - reconfigure them. Thus if I have to change the prefix CML
because of a clash with the Caledonian Music Lovers, I simply have to edit
one ENTITY in the XSchema. [If there is an sgmls-like 'include' facility in
the software, then I can even do it at runtime.] Since we have committed to
reconstituting 'normalised DTDs' from XSchemata, doesn't this take us
forward in maintaining namespace-aware DTDs? (We can't do it in
conventional ones, because PEs don't apply to elementTypes).
P.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg