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