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

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 UTC