The sample is quite simple :
we have a DTD which discribe a list of bibligoraphy
references :
A reference is an element which contains differents informations like
: authors, title of article, abstract; ....
The objective of the set of transformation is to present this set of
references in different form. In this exemple, we want to have four presentation.
<reference index="bougé2000a"
type="inproceedings" language="fr">
<authors> <p first="Patrick" last="Bougé"/> <p first="Jérôme" last="Euzenat"/> <p first="Jean-Paul" last="Barthès"/> </authors> <title>Localisation des connaissances dans les systèmes de production</title> <conference type="journées" name="Gestion de connaissances" sponsor="Prosper"> <location city="Toulouse" country="FR"/> </conference> <year>2000</year> <date>7-8 juin</date> <pages>31-50</pages> <links> <url href="http://www.univ-valenciennes.fr//Prosper-loc-formatted.zip" status="public"/> <url href="ftp://ftp.inrialpes.fr//bouge2000a.ps.gz" status="public"/> </links> <abstract>La gestion des connaissances s'instancie de manière extrèmement variée au sein des entreprises et elle mobilise des disciplines tout aussi ariées. Les connaissances considérées par les différentes approches peuvent être très différentes. On peut se demander si cet état de fait est dû aux approches mises en oeuvre ou exigé par la variété des applications englobées par la gestion de connaissance. On considère un ensemble de projets pouvant être considérés comme relevant de la gestion de connaissance restreinte au cadre des systèmes de productions. .</abstract> <areas> <li>Knowledge management/Gestion de connaissance</li> </areas> <contracts><li>ardeco</li></contracts> </reference> |
<?xml version="1.0"
encoding="UTF-8"?>
<transmorpher xmlns:FM="http://www.FluxMedia.fr/0.1"> <!-- WARNING ... this sample doesn't work alone, is part of the complex sample, it was split to simplify the presentation of the example --> <!-- Definition of the rule set.
<process
name="myFirstprocess"
in="R112"
out="X3
Y3 Z3">
<!-- this element remove the hidden element in the biblography -->
<!-- this element sort the biblography by title and year -->
<!-- this element sort the biblography by content, year and author -->
<!-- this element remove the abstract and other element in the bibliography
-->
</transmorpher> |
![]() bibliography sorted by type |
![]() bibliography sorted bye date |
![]() bibliography in bibtex |
<?xml version="1.0"
encoding="UTF-8"?>
<transmorpher xmlns:FM="http://www.FluxMedia.org/schema"> <!-- This sample allow to select a set of element
in the bibliography -->
<!-- Select a set of element : only troncy and brunet reference -->
<!-- Transform the XML to html -->
<!-- Write the HTML -->
</transmorpher> |
<-- This query allow to select all reference of Troncy and Brunet
author -->
<Query root="bibliography"> <Select expr="bibliography/reference[authors/p/@last='Troncy']"/> <Select expr="bibliography/reference[authors/p/@last='Brunet']"/> </Query> |
this description define a complexe transformation
show in figure 1.0
<?xml version="1.0"
encoding="UTF-8"?>
<transmorpher xmlns:TM="http://www.FluxMedia.fr/0.1"> <DefineRuleSet name="stripAbstract">
<processname="myFirstprocess"
in="R112"
out="X3
Y3 Z3">
<apply-external type="xslt"
name="XLST11"
file="strip-hidden.xsl"
in="D1"
out="X1"/>
<apply-external type="xslt"
name="XLST21"
file="sort-ty.xsl"
in="X11"
out="X2"/>
<apply-external type="xslt"
name="XLST22"
file="sort-cya.xsl"
in="X12"
out="Y2"/>
<ruleset type="Internal"
name="Rule-Abstract"
refOn="stripAbstract"
in="D3"
out="Z1"/>
<process
name="mySecondprocess"
in="R111"
out="Z3">
<main
name="myMainProcess">
<apply-process
name="Fisrt"
refOn="myFirstprocess"
in="X11"
out="X31
Y31 Z31" />
<serialize
name="SErializer1"
in="X31"
file="biblio.html"
/>
</transmorpher> |
Figure 1.0 : Complexe XSL process
![]() bibliography sorted by type |
![]() bibliography sorted bye date |
![]() bibliography in bibtex |
Next chapter: Computational model