1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:srw="http://www.loc.gov/zing/srw/"
4 xmlns:sru="http://docs.oasis-open.org/ns/search-ws/sruResponse"
5 xmlns:dc="http://www.loc.gov/zing/srw/dcschema/v1.0/"
6 xmlns:zr="http://explain.z3950.org/dtd/2.0/"
7 xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/"
8 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9 xmlns:bf="http://bibframe.org/vocab/"
12 <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
14 <xsl:template match="text()"/>
16 <xsl:template match="rdf:RDF">
18 <xsl:for-each select="bf:*">
19 <tr><td><b><xsl:value-of select="name(.)"/>:</b></td></tr>
20 <xsl:for-each select="./*">
21 <xsl:variable name="resource" select="./@rdf:resource"/>
22 <xsl:variable name="nodeid" select="./@rdf:nodeID"/>
24 <td/><td><b><xsl:value-of select="name(.)"/>:</b></td>
26 <xsl:if test="$resource">
27 <xsl:variable name="rvalue"
28 select="//*[@rdf:about=$resource]/*[1]"/>
30 <xsl:when test="$rvalue">
31 <xsl:value-of select="$rvalue"/>
34 <xsl:value-of select="$resource"/>
38 <xsl:if test="$nodeid">
39 <xsl:variable name="rvalue"
40 select="//*[@rdf:nodeID=$nodeid]/*[1]"/>
42 <xsl:when test="$rvalue">
43 <xsl:value-of select="$rvalue"/>
46 <xsl:value-of select="$nodeid"/>
50 <xsl:value-of select="."/>
58 <xsl:template match="/">
59 <xsl:call-template name="html"/>
62 <xsl:template name="html">
65 <title>BIBFRAME Full Display</title>
66 <link href="css.css" rel="stylesheet"
67 type="text/css" media="screen, all"/>
71 <xsl:apply-templates/>
77 <xsl:template match="srw:searchRetrieveResponse">
78 <h2>Search Results</h2>
79 <xsl:call-template name="diagnostic"/>
80 <xsl:call-template name="displaysearch"/>
83 <xsl:template name="diagnostic">
84 <xsl:for-each select="//diag:diagnostic">
85 <div class="diagnostic">
86 <!-- <xsl:value-of select="diag:uri"/> -->
87 <xsl:text> </xsl:text>
88 <xsl:value-of select="diag:message"/>
89 <xsl:text>: </xsl:text>
90 <xsl:value-of select="diag:details"/>
95 <xsl:template name="displaysearch">
96 <div class="searchresults">
97 <xsl:for-each select="srw:numberOfRecords">
99 <xsl:text>Number of Records: </xsl:text>
100 <xsl:value-of select="."/>
103 <xsl:for-each select="srw:records">
104 <xsl:for-each select="srw:record">
107 <xsl:text>Record </xsl:text>
108 <xsl:value-of select="srw:recordPosition"/>
111 <xsl:if test="srw:recordPacking='string'">
113 <xsl:value-of select="srw:recordData"/>
116 <xsl:if test="srw:recordPacking='xml'">
118 <xsl:when test="srw:recordSchema='marcxml'">
119 <xsl:text>MARCXML</xsl:text>
121 <xsl:when test="srw:recordSchema='bibframe'">
122 <xsl:apply-templates select="srw:recordData"/>
127 <form name="rawlink" method="get">
128 <input type="hidden" name="version">
129 <xsl:attribute name="value">
131 select="//srw:echoedSearchRetrieveRequest/srw:version"/>
134 <input type="hidden" name="operation" value="searchRetrieve"/>
135 <input type="hidden" name="query">
136 <xsl:attribute name="value">
138 select="//srw:echoedSearchRetrieveRequest/srw:query"/>
141 <input type="hidden" name="recordPacking">
142 <xsl:attribute name="value">
143 <xsl:value-of select="srw:recordPacking"/>
146 <input type="hidden" name="recordSchema">
147 <xsl:attribute name="value">
148 <xsl:value-of select="srw:recordSchema"/>
151 <input type="hidden" name="startRecord">
152 <xsl:attribute name="value">
153 <xsl:value-of select="srw:recordPosition"/>
156 <input type="hidden" name="maximumRecords" value="1"/>
157 <input type="submit">
158 <xsl:attribute name="value">
159 <xsl:text>Raw Record </xsl:text>
160 <xsl:value-of select="srw:recordPosition"/>