W3C home > Mailing lists > Public > public-grddl-wg@w3.org > July 2006

XSLT1 for RDFa (was GRDDL, XSLT 1, XSLT 2, and Javascript/ECMAscript)

From: Fabien Gandon <Fabien.Gandon@sophia.inria.fr>
Date: Thu, 27 Jul 2006 09:12:08 +0200
Message-ID: <44C86748.7070704@sophia.inria.fr>
To: public-grddl-wg@w3.org
CC: Ben Adida <ben@mit.edu>

Hi Ian,

Ian Davis a écrit :
> I believe RDFa requires XSLT2 for the namespace/qname handling. I'm 
> not sure that Atom/OWL requires XSLT2 but it was more a design choice 
> by the developer to get N3 output out of the stylesheet (IIRC!)
I am not sure I get it right but I think we can handle qname with XSLT1.
It is a question I sent to the list RDF in XHTML a month ago and for 
instance here is the template we developed to expand a qname (complete 
styelsheet is available here [1]) :

  <!-- expand namespace of a qname -->
  <template name="expand-ns" >
    <param name="qname" />
    <variable name="ns_prefix" select="substring-before($qname,':')" />
    <variable name="name" select="substring-after($qname,':')" />
    <variable name="ns_uri" 
select="ancestor-or-self::*/namespace::*[name()=$ns_prefix][position()=1]" 
/>
    <value-of select="concat($ns_uri,$name)" />
  </template>

Fabien.

[1] http://www-sop.inria.fr/acacia/soft/sweetwiki.html

-- 
"the worst kind of intolerance comes
 from what is known as reason."
         -- Miguel de Unamuno.
 ____________
|__ _ |_  http://www-sop.inria.fr/acacia/personnel/Fabien.Gandon/
|  (_||_) INRIA Sophia Antipolis - ph# (33)(0)4 92 38 77 88
Received on Thursday, 27 July 2006 07:15:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:45 GMT