-->
R u l e M L

<--


Object-Oriented to Positional RuleML Translators

Stephen Greene

2003-08-26: Version 0.6



XSLT translators between Object-Oriented RuleML and Positional RuleML are provided through this page

Contents

Overview

This is a set of (XSLT-specified) translators for transforming RuleML between its Positional (version 0.82) and Object-Oriented (version 0.83) specifications.

The transformation of Object-Oriented RuleML into Positional RuleML occurs in a three step XSLT translation process. The task of of transforming RuleML has been modularized into a translator which applies the signature for each relation to the metaroles (_r) found within each implementation of the relation; a translator that sorts an object centred RuleML file; and a translator which positionalizes the RuleML by removing all of the metaroles and leaving the contents in a positionalized version of the source document.

The transformation of Positional RuleML into Object-Oriented RuleML occurs in a one step XSLT translation. The translator inserts metaroles into the Positional RuleML based on an object-oriented signature.

Translators

Object-Oriented RuleML to Positional RuleML Translators
applysig.xsl
nprmlsort.xsl
nprml2prml.xsl
prml2nprml.xsl


Explanation

Object-Oriented RuleML to Positional RuleML Flow Diagram

The three translators, applysig.xsl, nprmlsort.xsl, and nprml2prml.xsl must be piped together in order to completely transform Object-Oriented RuleML to Positional RuleML file. Each translator performs operations on the same set of nodes and is dependant on the output of the translator that is applied before it. The applysig.xsl translator applys the specified object-oriented signature to all of the metaroles ensuring that the output is a complete RuleML file and adheres to the provided signature. Once the signature has been applied to the RuleML, it can be sorted by nprmlsort.xsl. This ensures that when the metaroles are removed by nprml2prml.xsl, there is a guaranteed order that is maintained.

Positional RuleML to Object-Oriented RuleML Flow Diagram

The prml2nprml.xsl translator performs the transformation of Positional RuleML (containing an object-oriented signature) to Object-Oriented RuleML in a single step. The translator loops through each atom or cterm and applies the signature declaration that responds to the implimentation. The sorted order is not maintained during the transformation and the output is unsorted, Object-Oriented RuleML.

Test Cases

Object-Oriented RuleML to Positional RuleML Test Case Examples
Input Files
Output Files
applysig.xsl nprmlsort.xsl nprml2prml.xsl
simpleCase.xml Complete simpleCase.xml Sorted simpleCase.xml Positionalized simpleCase.xml
ctermCase.xml Complete ctermCase.xml Sorted ctermCase.xml Positionalized ctermCase.xml
complexCase.xml Complete complexCase.xml Sorted complexCase.xml Positionalized complexCase.xml

The output of each translator is listed under the translators name in the above table. It is used as input for the next translator in the sequence.



Positional RuleML to Object-Oriented RuleML Test Case Examples
Input Files
Output Files
prml2nprml.xsl
Positional simpleCase.xml Object-Oriented simpleCase.xml
Positional ctermCase.xml Object-Oriented ctermCase.xml
Positional complexCase.xml Object-Oriented complexCase.xml


Site Contact: Harold Boley. Page Version: 2003-03-28


"Practice what you preach": XML source of this homepage at oo2prml.xml (oo2prml.xml.txt);
transformed to HTML via the adaptation of Michael Sintek's SliML XSLT stylesheet at homepage.xsl (View | Page Source)