ing property or its subproperty is processed using
the value tag. Inference of property subsumption
granted by the reasoner makes it possible to select
the most suitable template in every case and to verify
property templates. Property templates can be under-
stood as reusable snippets that reduce repeatable code
for property value processing.
The same-as reasoning is used in another variant
of templates — individual templates. These templates
are bound to concrete individuals in the ontology.
Provided that there is a same-as relation between indi-
viduals i and i
0
and the individual template is present
for i then this template is used whenever a template
needs to be applied to i
0
. We can validate an individ-
ual template using known assumptions about this in-
dividual and by computing the most specific concept
for it.
Another feature that is currently under develop-
ment are class and property templates. These tem-
plates apply directly to classes and properties in con-
trast to previously mentioned templates that apply to
class instances and property values. Class templates
can be used to render a description of a class which
can be based on the values of annotation properties.
These templates could also be used to process (i.e.
apply templates to) the set of known instances of the
corresponding class as well as the sets of its known
subclasses or superclasses.
A class template is applicable to all the classes that
subsume the corresponding class. The same holds for
property templates. Class and property template sys-
tems might be verified in the same way as other tem-
plate systems.
7 CONCLUSIONS AND FUTURE
WORK
We described a language for ontology-driven trans-
formations of the RDF data. Transformations consist
of templates. Each template is bound to a class from
an ontology and is suitable to transform its instances.
Template bodies can be verified and validated against
the corresponding class definition in order to to elimi-
nate possible run-time transformation errors. We have
shown an example which illustrates the process of
verification.
The transformation syntax is based on XML but
the transformation result can be of any text-based
format; thus, one can define RDF to XML, RDF to
HTML, RDF to plain text or even RDF to RDF trans-
formations and so on. The language is currently im-
plemented on the Java platform using the Scala lan-
guage. Jena framework in conjunction with Pellet rea-
soner are used for ontology processing.
Utilization of the reasoner helps to transform doc-
uments relying upon their semantic structure:
• the transformation process will pick up the right
templates not only for individuals that state their
type explicitly but also for individuals that are im-
plicitly classified by the reasoner;
• the transformation result for different documents
which are semantically equivalent will be the
same, e.g. if the ontology states that p
0
is the
inverse of property p then documents containing
a p b and b p
0
a will be equally transformed.
There is a number of extensions that we plan to
implement in our future work, e.g. the possibility
to bind templates to “anonymous” classes expressed
as description logic formulas (‘married people’, ‘mar-
ried people with kids’ etc.): right now it is only pos-
sible to bind to “named” classes by their URI.
The principles of ontology-based template trans-
formations are utilized in a more general framework
for the processing of RDF data. Whereas the tem-
plate language is suitable only to generate different
representations, i.e. construct some strings, from the
RDF resources, the framework is suitable to execute
arbitrary operations. This result is achieved by sub-
stituting templates with functions whose return type
is not limited to strings. Interesting point is that this
framework might be considered as a means of object
oriented programming (OOP) on ontologies. Instance
templates correspond to instance methods and class
templates — to static methods. This enables to use
ontologies as class hierarchies in OOP programs with-
out losing reasoning capabilities.
REFERENCES
Alkhateeb, F. and Laborie, S. (2008). Towards extending
and using SPARQL for modular document generation.
In Proceedings of the eighth ACM symposium on Doc-
ument engineering, pages 164–172. ACM.
Baader, F., Calvanese, D., McGuinness, D., Nardi, D., and
Patel-Schneider, P. (2007). The Description Logic
Handbook: Theory, Implementation, and Applica-
tions. Cambridge University Press.
Clark, J. et al. (1999). XSL transformations (XSLT) ver-
sion 1.0. W3C Recommendation 16 November 1999.
Corby, O., Faron-Zucker, C., and Gandon, F. (2014).
SPARQL template: A transformation language for
RDF. report, Inria RR-8514.
Davis, I. (2003). RDF template language 1.0. Specification
Draft.
Egana, M., Antezana, E., and Stevens, R. (2008). Trans-
forming the axiomisation of ontologies: The ontology
pre-processor language. Proceedigns of OWLED.
WEBIST2015-11thInternationalConferenceonWebInformationSystemsandTechnologies
510