usebnodes=true and update XSLs due to different output
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 11 Aug 2014 12:22:37 +0000 (14:22 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 11 Aug 2014 12:22:37 +0000 (14:22 +0200)
In particular workTitle and creator has ref:nodeID attribute
rather than rdf:resource .

bibframe/config.xml
bibframe/xsl/briefDisplay.xsl
bibframe/xsl/fullDisplay.xsl

index 055a163..899711f 100644 (file)
@@ -37,6 +37,7 @@
        <record name="marcxmluri"/>
        <variable name="serialization" value="rdxml"/>
        <variable name="baseuri" value="http://id.loc.gov/resources/bibs/"/>
+       <variable name="usebnodes" value="true"/>
       </filter>
       <filter type="record_transform">
        <retrievalinfo  xmlns="http://indexdata.com/yaz" version="1.0">
index e029f97..eb1a544 100644 (file)
     <table>
       <xsl:for-each select="bf:Work/bf:creator">
        <xsl:variable
-           name="resource" select="./@rdf:resource"/>
+           name="resource" select="./@rdf:nodeID"/>
        <tr>
          <td><b>Creator:</b></td>
          <td>
-           <xsl:value-of select="//*[@rdf:about=$resource]/bf:label"/>
+           <xsl:value-of select="//*[@rdf:nodeID=$resource]/bf:label"/>
          </td>
        </tr>
       </xsl:for-each>
       <xsl:for-each select="bf:Work/bf:workTitle">
        <xsl:variable
-           name="resource" select="./@rdf:resource"/>
+           name="resource" select="./@rdf:nodeID"/>
        <tr>
          <td><b>Work Title:</b></td>
          <td>
-           <xsl:value-of select="//*[@rdf:about=$resource]/bf:titleValue"/>
+           <xsl:value-of select="//*[@rdf:nodeID=$resource]/bf:titleValue"/>
          </td>
        </tr>
       </xsl:for-each>
index 967f45d..6d1d838 100644 (file)
@@ -19,6 +19,7 @@
        <tr><td><b><xsl:value-of select="name(.)"/>:</b></td></tr>
        <xsl:for-each select="./*">
          <xsl:variable name="resource" select="./@rdf:resource"/>
+         <xsl:variable name="nodeid" select="./@rdf:nodeID"/>
          <tr>
            <td/><td><b><xsl:value-of select="name(.)"/>:</b></td>
            <td/><td>
                  </xsl:otherwise>
                </xsl:choose>
              </xsl:if>
+             <xsl:if test="$nodeid">
+               <xsl:variable name="rvalue"
+                             select="//*[@rdf:nodeID=$nodeid]/*[1]"/>
+               <xsl:choose>
+                 <xsl:when test="$rvalue">
+                   <xsl:value-of select="$rvalue"/>
+                 </xsl:when>
+                 <xsl:otherwise>
+                   <xsl:value-of select="$nodeid"/>
+                 </xsl:otherwise>
+               </xsl:choose>
+             </xsl:if>
              <xsl:value-of select="."/>
            </td>
          </tr>