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>
20 <xsl:variable name="n" select="./@rdf:nodeID"/>
22 (<xsl:value-of select="$n"/>)
25 <xsl:for-each select="./*">
26 <xsl:variable name="lang" select="./@xml:lang"/>
27 <xsl:if test="not($lang='x-bf-hashable')">
28 <xsl:variable name="resource" select="./@rdf:resource"/>
29 <xsl:variable name="nodeid" select="./@rdf:nodeID"/>
33 <b><xsl:value-of select="name(.)"/>:</b>
37 <xsl:when test="$resource">
38 <xsl:variable name="rvalue"
39 select="//*[@rdf:about=$resource]/*[1]"/>
41 <xsl:when test="$rvalue">
42 <xsl:value-of select="$rvalue"/>
46 <xsl:attribute name="href">
47 <xsl:value-of select="$resource"/>
49 <xsl:value-of select="$resource"/>
54 <xsl:when test="$nodeid">
55 <xsl:variable name="rvalue"
56 select="//*[@rdf:nodeID=$nodeid]/*[1]"/>
58 <xsl:when test="$rvalue">
59 <xsl:value-of select="$rvalue"/>
60 (<xsl:value-of select="$nodeid"/>)
63 <xsl:value-of select="$nodeid"/>
67 <xsl:when test="bf:Identifier">
68 <xsl:value-of select="bf:Identifier/bf:identifierValue"/>
71 <xsl:value-of select="."/>
82 <xsl:template match="/">
83 <xsl:call-template name="html"/>
86 <xsl:template name="html">
89 <title>BIBFRAME Full Display</title>
90 <link href="css.css" rel="stylesheet"
91 type="text/css" media="screen, all"/>
95 <xsl:apply-templates/>
101 <xsl:template match="srw:searchRetrieveResponse">
102 <h2>Search Results</h2>
103 <xsl:call-template name="diagnostic"/>
104 <xsl:call-template name="displaysearch"/>
107 <xsl:template name="diagnostic">
108 <xsl:for-each select="//diag:diagnostic">
109 <div class="diagnostic">
110 <!-- <xsl:value-of select="diag:uri"/> -->
111 <xsl:text> </xsl:text>
112 <xsl:value-of select="diag:message"/>
113 <xsl:text>: </xsl:text>
114 <xsl:value-of select="diag:details"/>
119 <xsl:template name="displaysearch">
120 <div class="searchresults">
121 <xsl:for-each select="srw:numberOfRecords">
123 <xsl:text>Number of Records: </xsl:text>
124 <xsl:value-of select="."/>
127 <xsl:for-each select="srw:records">
128 <xsl:for-each select="srw:record">
131 <xsl:text>Record </xsl:text>
132 <xsl:value-of select="srw:recordPosition"/>
135 <xsl:if test="srw:recordPacking='string'">
137 <xsl:value-of select="srw:recordData"/>
140 <xsl:if test="srw:recordPacking='xml'">
142 <xsl:when test="srw:recordSchema='marcxml'">
143 <xsl:text>MARCXML</xsl:text>
145 <xsl:when test="srw:recordSchema='bibframe'">
146 <xsl:apply-templates select="srw:recordData"/>
151 <form name="rawlink" method="get">
152 <input type="hidden" name="version">
153 <xsl:attribute name="value">
155 select="//srw:echoedSearchRetrieveRequest/srw:version"/>
158 <input type="hidden" name="operation" value="searchRetrieve"/>
159 <input type="hidden" name="query">
160 <xsl:attribute name="value">
162 select="//srw:echoedSearchRetrieveRequest/srw:query"/>
165 <input type="hidden" name="recordPacking">
166 <xsl:attribute name="value">
167 <xsl:value-of select="srw:recordPacking"/>
170 <input type="hidden" name="recordSchema">
171 <xsl:attribute name="value">
172 <xsl:value-of select="srw:recordSchema"/>
175 <input type="hidden" name="startRecord">
176 <xsl:attribute name="value">
177 <xsl:value-of select="srw:recordPosition"/>
180 <input type="hidden" name="maximumRecords" value="1"/>
181 <input type="submit">
182 <xsl:attribute name="value">
183 <xsl:text>Raw Record </xsl:text>
184 <xsl:value-of select="srw:recordPosition"/>