Elements and Attributes from Other Namespaces in a DTD

by "David Wagner" <dwagner(at)kevric.com>

 Date:  Mon, 8 May 2000 11:20:57 -0500
 To:  <hwg-xml(at)hwg.org>
  todo: View Thread, Original
I would like to know how to reuse elements and attributes defined in
existing specifications in my own DTD.

_Attributes_
What is the proper way to declare attributes from another namespace for use
on a custom element?  One example of this is even used in the XLINK working
draft, but I cannot find the method used to declare the namespace of an
attribute in the DTD.

<blockquote cite=" http://www.w3.org/TR/xlink/#defaulting">
Using XLink potentially involves using a large number of attributes for
supplying important link information. In cases where the values of the
desired XLink attributes are unchanging across individual instances in all
the documents of a certain type, attribute value defaults (fixed or not) can
be added to a DTD so that the attributes do not have to appear physically on
element start-tags.
</blockquote>

I currently use something like the following line, and it works just fine,
but there is no reference in the DTD to the fully-qualified value of the
xlink: prefix.
<!ATTLIST
...
xlink:show (embed|replace) #IMPLIED
...
>
How do I specify what the xlink namespace is?  (My XSLT processor would like
to know...)

_Elements_
I would like to define an element in my DTD such that it may contain SVG,
XHTML, MathML, or other markup from other namespaces.  It would be used in a
document like this; note the use of xhtml fragments rather than full
documents; I may need any  element from other namespaces to be allowed
within myelement.
...
<myelement>
 <body xmlns="http://www.w3.org/1999/xhtml">
  <h1>This is XHTML</h1>
  <p>In addition to this paragraph, it may be followed by anything
     else legal in an xhtml:body</p>...</body>
 <svg xmlns="http://www.w3.org/2000/svg-20000303-stylable">
  <!-- This is SVG 1.0 -->...</svg>
 <math xmlns="http://www.w3.org/TR/REC-MathML">
  <!-- This is MathML 1.01 -->...</math>
 <p xmlns="http://www.w3.org/1999/xhtml">
  <p>This is just a small bit of xhtml, perhaps containing inline
elements.</p>
</myelement>
...
 I want my DTD to reference the other DTDs so it can validate the content of
the body, svg, math, and other elements from other DTDs.  How do I do this?
Must I include large portions of these DTDs in my own DTD?

Thank you all in advance your kind assistance. -David

HWG hwg-xml mailing list archives, maintained by Webmasters