The DLML structures can be used for storing and communicating terminologies to other systems. But, they can also be transformed in the process. Here we exemplify some use of DLML through transformations. The XML document manipulations presented below are achieved easily with XML Stylesheet Language Tranformations (XSLT). Moreover the transformations are described in a modular way which follows the modular description of the logics themselves.
The manipulations are mainly achieved by designing an XSLT stylesheet which transform a source document into a target document. For performing these transformations with the XT engine (so far, the version 19991105), type the command lines:
One straightforward manipulation is the export of XML documents (corresponding to a terminology) into a printable format (here LaTeX). The XSLT stylesheets have been designed in the same modular way as the logics and gathered into a common dlml2tex.xsl stylesheet.
One can have a look at the export of the complete example above in its LaTeX version and in the picture below:The FaCT system described in its own DTD, we developped two stylesheets simplefact2aluni.xsl and aluni2fact.xsl for importing and exporting in this DTD.
However, FaCT introduces terms with equations instead of definitions. As a consequence there can be several equations for the same term and simplefact2aluni.xsl has trouble dealing with them. fact2aluni.xsl does the job of gathering equations in a single definition (with some additional hypothesis: there is only one definitional equation,...). It can transform the sample people.xml into the equivalent people-dlml.xml (see the PostScript layout of the resulting terminology) which can be translated back to a people-fact.xml by the initial aluni2fact.xsl (of course, the form is different since there are now at most one equation by atom).Another interesting application is the transformation from one language to another (equivalent) one by rewriting the operators. This is again achieved by the alc2alue.xsl stylesheet which transforms an ALC terminology into an equivalent ALUE terminology.
Syntactic weakening allow to transform a terminology in a terminology in a weaker logic. This is achieved by the alc2al.xsl stylesheet which transforms the same ALC terminology into a less informative AL terminology.
One funny use of XSLT would be the developpement of a normalisation algorithm for description logics (because XSLT is a tree rewritting language, it is especially well designed for that purpose). Unfortunately it is not simple to have XSLT behaving as a real rewrite system. As a matter of fact, XSLT seems to prohibit the (non structure-based) recursive operation. So, it will be nessesary to resort to another language for programming the trasnformation or to an external controler over XSLT.
More ambitious is the transformation from one logic to another in
order to take advantage of more time-reliable algorithms. This might
weaken the content of the terminology but remains useful.
We did a small example by converting from syllogisms to AL
(syl2al.xsl) and back
(al2syl.xsl).