fixed prefix access
authorTim L <lebot@rpi.edu>
Fri, 14 Dec 2012 10:24:52 -0500
changeset 535236f87c764618
parent 5351 d487d44e6ae6
child 5353 efec02984754
fixed prefix access
examples/eg-43-xmlns-not-accessible/xml/get-prefix.xsl
     1.1 --- a/examples/eg-43-xmlns-not-accessible/xml/get-prefix.xsl	Fri Dec 14 10:12:44 2012 -0500
     1.2 +++ b/examples/eg-43-xmlns-not-accessible/xml/get-prefix.xsl	Fri Dec 14 10:24:52 2012 -0500
     1.3 @@ -19,9 +19,10 @@
     1.4     <!-- These two work, but require an addition of a <prov:prefix> element -->
     1.5     <xsl:variable name="magic2" select="//prov:prefix[@prov:id=$prefix]"/>
     1.6     <xsl:variable name="magic3" select="key('prefix',$prefix)"/>
     1.7 +   <xsl:variable name="magic4" select="namespace-uri-for-prefix($prefix,//prov:entity)"/>
     1.8  
     1.9     <xsl:value-of select="concat('The full URI of your painting is ',
    1.10 -                                $magic3,
    1.11 +                                $magic4,
    1.12                                  substring-after(//prov:entity/@prov:ref,':'))"/>
    1.13  </xsl:template>
    1.14