Abstract : In this paper we address the general research question of How can we express constraints on RDF data and how can we check that an RDF graph satisfies some given constraints? and we focus on expressing constraints defining OWL 2 profiles and checking these constraints for OWL validation. We propose an approach based on the SPARQL Template Transformation language (STTL). An STTL template is a transformation rule that applies to a given RDF graph and the recursive call of a set of STTL templates on an RDF graph outputs some textual data resulting from the transformation of this graph. We show that STTL can be used as a constraint language for RDF and we use it to implement the semantics of OWL 2 profiles: each profile is represented by a set of STTL templates that a valid ontology must satisfy.