[This local archive copy is from the official and canonical URL, http://www.xmlxperts.com/xmlmathdtd.htm; please refer to the canonical source document if possible.]
![]()
ISO 12083 Math XML DTD
This DTD was developed according to XML conversion specifications from the November meeting in Chicago. You can link to the minutes for complete details and comments.
This DTD is a Draft. We ask you to Parse it with your XML parser of choice and provide feedback. We need your help to validate our work! Send all comments to Dianne Kennedy.
<!-- This is the ISO12083:1998 XML document type definition for Mathematics.-->
<!-- Draft XML version of the Mathematics DTD for Public Review -->
<!-- ===================================================================== -->
<!-- PUBLIC DOCUMENT TYPE DEFINITION SUBSET -->
<!-- ===================================================================== -->
<!--
This DTD is included by the XML Book and Article DTDs of ISO12083:1998.
As it is a separate entity it may also be included by other DTDs.
Since there is no consensus on how to describe the semantics of formulas,
it only describes their presentational or visual structure. Since, however,
there is a strong need for such description (especially within the
print-disabled community), it is recommended that the following
declaration be added where there is a requirement for a consistent,
standardized mechanism to carry semantic meanings for the SGML
elements declared throughout this part of this International Standard:
<!ENTITY % SDAMAP "SDAMAP NAME #IMPLIED" >
and that the attribute represented by %SDAMAP; be made available for
all elements which may require a semantic association, or, in the simpler
case, be added to all elements in this DTD. -->
<!-- ===================================================================== -->
<!-- Parameter entities describing the possible contents of formulas. -->
<!-- ===================================================================== -->
<!ENTITY % p.trans "bold|italic|sansser|typewrit|smallcap|roman"
-- character transformations -->
<!ENTITY % m.math "#PCDATA |fraction|subform|sup|inf|top|bottom|middle|fence|mark|
post|box|overline|undrline|radical|array|hspace|vspace|break|markref" -->
<!-- mathematical formula elements -->
<!-- ===================================================================== -->
<!-- Accessible Document and other Parameter Entities
If this DTD is not imbedded by a ISO12083:1994 Book or Article,
the comment delimiters should be removed. -->
<!-- ===================================================================== -->
<!--ENTITY % SDAFORM "SDAFORM CDATA #FIXED" -->
<!--ENTITY % SDARULE "SDARULE CDATA #FIXED" -->
<!--ENTITY % SDAPREF "SDAPREF CDATA #FIXED" -->
<!--ENTITY % SDASUFF "SDASUFF CDATA #FIXED" -->
<!--ENTITY % SDASUSP "SDASUSP CDATA #FIXED" -->
<!-- ===================================================================== -->
<!-- This entity is for an attribute to indicate which alphabet is
used in the element (formula, dformula). You may change this to
a notation attribute, where the notation could describe a
keyboard mapping. Please modify the set as necessary.
If this DTD is not imbedded by a ISO12083:1994 Book or Article,
the comment delimiters should be removed. -->
<!-- ===================================================================== -->
<!--ENTITY % a.types "(latin|greek|cyrillic|hebrew|kanji) 'latin'" -->
<!-- ===================================================================== -->
<!-- character transformations -->
<!-- ===================================================================== -->
<!-- ELEMENT CONTENT EXPLANATIONS -->
<!ELEMENT bold (#PCDATA|%p.trans;)* >
<!ELEMENT italic (#PCDATA|%p.trans;)* >
<!ELEMENT sansser (#PCDATA|%p.trans;)* >
<!ELEMENT typewrit (#PCDATA|%p.trans;)* >
<!ELEMENT smallcap (#PCDATA|%p.trans;)* >
<!ELEMENT roman (#PCDATA|%p.trans;)* >
<!-- ===================================================================== -->
<!-- Fractions -->
<!-- ===================================================================== -->
<!-- ELEMENT MIN CONTENT EXPLANATIONS -->
<!ELEMENT fraction (num, den) >
<!ELEMENT num (%m.math;|%p.trans;)* >
<!ELEMENT den (%m.math;|%p.trans;)* >
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST fraction shape (built|case) #IMPLIED
align (left|center|right)
center
style (single|double|triple|dash|dot|bold|blank|none)
single >
<!-- ===================================================================== -->
<!-- Superiors, inferiors, accents, over and under -->
<!-- ===================================================================== -->
<!-- ELEMENT MIN CONTENT EXPLANATIONS -->
<!ELEMENT sup (%m.math;|%p.trans;)* >
<!ELEMENT inf (%m.math;|%p.trans;)* >
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST sup location (pre|post) post
arrange (compact|stagger)
compact >
<!ATTLIST inf location (pre|post) post
arrange (compact|stagger) compact >
<!-- ===================================================================== -->
<!-- Embellishments -->
<!-- ===================================================================== -->
<!-- ELEMENT MIN CONTENT EXPLANATIONS -->
<!ELEMENT top (%m.math;|%p.trans;)* >
<!ELEMENT middle (%m.math;|%p.trans;)* >
<!ELEMENT bottom (%m.math;|%p.trans;)* >
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST top align (left|center|right)
center
sizeid ID #IMPLIED >
<!ATTLIST middle align (left|center|right)
center
sizeid ID #IMPLIED >
<!ATTLIST bottom align (left|center|right)
center
sizeid ID #IMPLIED >
<!-- The subform element is defined later -->
<!-- ===================================================================== -->
<!-- Fences, boxes, overlines and underlines -->
<!-- ===================================================================== -->
<!-- ELEMENT CONTENT EXPLANATIONS -->
<!ELEMENT mark EMPTY >
<!ELEMENT fence (%m.math;|%p.trans;)* >
<!ELEMENT post EMPTY >
<!ELEMENT box (%m.math;|%p.trans;)* >
<!ELEMENT overline (%m.math;|%p.trans;)* >
<!ELEMENT undrline (%m.math;|%p.trans;)* >
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST mark id ID #REQUIRED >
<!ATTLIST fence lpost CDATA "|"
rpost CDATA "|"
style (single|double|triple|dash|dot|bold|blank|none)
single
sizeid ID #IMPLIED
sizeref IDREF #IMPLIED >
<!ATTLIST post post CDATA "|"
style (single|double|triple|dash|dot|bold|blank|none)
single
sizeid ID #IMPLIED
sizeref IDREF #IMPLIED >
<!ATTLIST box style (single|double|triple|dash|dot|bold|blank|none)
single >
<!ATTLIST overline type CDATA "-"
style (single|double|triple|dash|dot|bold|blank|none)
single
start IDREF #IMPLIED
end IDREF #IMPLIED >
<!ATTLIST undrline type CDATA "_"
style (single|double|triple|dash|dot|bold|blank|none)
single
start IDREF #IMPLIED
end IDREF #IMPLIED >
<!-- ===================================================================== -->
<!-- Labelled arrows -->
<!-- ===================================================================== -->
<!-- ELEMENT CONTENT EXPLANATIONS -->
<!ELEMENT subform (%m.math;|%p.trans;)* >
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST subform sizeid ID #IMPLIED
sizeref IDREF #IMPLIED >
<!-- ===================================================================== -->
<!-- Roots -->
<!-- ===================================================================== -->
<!-- ELEMENT CONTENT EXPLANATIONS -->
<!ELEMENT radical (radix?, radicand) >
<!ELEMENT radix (%m.math;|%p.trans;)* >
<!ELEMENT radicand (%m.math;|%p.trans;)* >
<!-- ===================================================================== -->
<!-- Arrays -->
<!-- ===================================================================== -->
<!-- ELEMENT CONTENT EXPLANATIONS -->
<!ELEMENT array (arrayrow+|arraycol+) >
<!ELEMENT arrayrow (arraycel+) >
<!ELEMENT arraycol (arraycel+) >
<!ELEMENT arraycel (%m.math;|%p.trans;)* >
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST array rowalign NMTOKENS #IMPLIED
colalign NMTOKENS #IMPLIED
rowsep NMTOKENS #IMPLIED
colsep NMTOKENS #IMPLIED >
<!-- ===================================================================== -->
<!-- Spacing -->
<!-- ===================================================================== -->
<!-- ELEMENT CONTENT EXPLANATIONS -->
<!ELEMENT hspace EMPTY >
<!ELEMENT vspace EMPTY >
<!ELEMENT break EMPTY >
<!ELEMENT markref EMPTY >
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST hspace space CDATA "1 mm" >
<!ATTLIST vspace space CDATA "1 mm" >
<!ATTLIST markref refid IDREF #REQUIRED
direct (hor|ver) hor >
<!-- ===================================================================== -->
<!-- the formula elements -->
<!-- ===================================================================== -->
<!-- ELEMENT MIN CONTENT EXPLANATIONS -->
<!ELEMENT formula (%m.math;|%p.trans;)*
-- in-line formula -->
<!ELEMENT dformula (%m.math;|%p.trans;)*
-- display formula -->
<!ELEMENT dformgrp (formula|dformula)+
-- display-formula group -->
<!-- ELEMENT NAME VALUE DEFAULT -->
<!ATTLIST formula id ID #IMPLIED
alphabet %a.types;
%SDAPREF; "<?SDATRANS>Inline formula"
%SDASUSP; "SUSPEND" >
<!ATTLIST dformula id ID #IMPLIED
num CDATA #IMPLIED
align (left|center|right)
center
alphabet %a.types;
%SDAPREF; "<?SDATRANS>Display formula"
%SDASUSP; "SUSPEND" >
<!ATTLIST dformgrp id ID #IMPLIED
num CDATA #IMPLIED
align (left|center|right)
center
%SDAPREF; "<?SDATRANS>Display formula group" >
![]()
![]()