[om] OMATP attribute pair constructor

Andreas Franke afranke at ags.uni-sb.de
Wed Sep 8 15:53:52 CEST 1999


Hello all,

maybe it is a bit late, but nevertheless I'd like to propose a 
change in the use of the OMATP attribute pair constructor.

In omobj.dtd the definition is as follows:

	<!-- attribution constructor & attribute pair constructor -->
        <!ELEMENT OMATTR (OMATP, (%omel;)) >
        <!ELEMENT OMATP (OMS, (%omel;))+ >

That means that multiple attributions have to be written this way:

<OMATTR>
	<OMATP>
		<OMS cd="..." name="type"/>
                <OMS cd="..." name="foo"/>
		<OMS cd="..." name="MathML_encoding"/>
                <OMSTR> here goes the MathML stuff </OMSTR>
	</OMATP>
	<OMV name="bar">
</OMATTR>

To begin with this looks quite unnatural to me: elements within the
OMATP-element may be attribute "names" as well as attribute values, 
and the only formal difference is whether the place number is odd or even -
not a very nice criteria.
 
Secondly, the name doesn't fit properly this way: OMATP is said to be the
``attribute pair constructor'', but actually <OMATP> and </OMATP> don't
include a pair but a list of pairs (called an AList in LISP, for example).

If one would write

<OMATTR>
	<OMATP>
		<OMS cd="..." name="type"/>
                <OMS cd="..." name="foo"/>
	</OMATP>
	<OMATP>
		<OMS cd="..." name="MathML_encoding"/>
                <OMSTR> here goes the MathML stuff </OMSTR>
	</OMATP>
	<OMV name="bar">
</OMATTR>

instead, it would be better:

- the attribution pairs would be clearly structured
- the OMATP tag would deserve its name
- finally, this would make it easier to cut & paste (e.g. type attributions)

I could not find any rules that would not allow it in a dtd, so maybe one 
could use

	<!-- attribution constructor & attribute pair constructor -->
        <!ELEMENT OMATTR (OMATP*, (%omel;)) >
        <!ELEMENT OMATP (OMS, (%omel;)) >
or
	<!-- attribution constructor & attribute pair constructor -->
        <!ELEMENT OMATTR (OMATP+, (%omel;)) >
        <!ELEMENT OMATP (OMS, (%omel;)) >

if empty attributions are not allowed.

I could only find one single example for the use of multiple attributions 
in the official CDs, namely in altenc.ocd. There the proper grouping of 
the pairs is done by inserting blank lines between the pairs.

By the way: in my version of "ecc.ocd",  
    <CDReviewDate> 1999-09-01 </CDReviewDate>
    <CDDate> 1999-05-10 </CDDate>
    <CDVersion> 1.0a </CDVersion>
some occurrences of <OMATP> seem to be mal-formed.


Regards,

Andreas Franke (afranke at ags.uni-sb.de)



--
om at openmath.org  -  general discussion on OpenMath
Post public announcements to om-announce at openmath.org
Automatic list maintenance software at majordomo at openmath.org
Mail om-owner at openmath.org for assistance with any problems



More information about the Om mailing list