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><xsl:value-of select="name(.)"/></td></tr>
20 <xsl:for-each select="./*">
21 <xsl:variable name="resource" select="./@rdf:resource"/>
23 <td/><td><xsl:value-of select="name(.)"/></td>
25 <xsl:if test="$resource">
26 <xsl:variable name="rvalue"
27 select="//*[@rdf:about=$resource]/*[1]"/>
29 <xsl:when test="$rvalue">
30 <xsl:value-of select="$rvalue"/>
33 <xsl:value-of select="$resource"/>
37 <xsl:value-of select="."/>
45 <xsl:template match="/">
46 <xsl:call-template name="html"/>
49 <xsl:template name="html">
52 <title>Full Display</title>
53 <link href="css.css" rel="stylesheet"
54 type="text/css" media="screen, all"/>
58 <xsl:apply-templates/>
64 <xsl:template match="srw:searchRetrieveResponse">
65 <h2>Search Results</h2>
66 <xsl:call-template name="diagnostic"/>
67 <xsl:call-template name="displaysearch"/>
70 <xsl:template name="diagnostic">
71 <xsl:for-each select="//diag:diagnostic">
72 <div class="diagnostic">
73 <!-- <xsl:value-of select="diag:uri"/> -->
74 <xsl:text> </xsl:text>
75 <xsl:value-of select="diag:message"/>
76 <xsl:text>: </xsl:text>
77 <xsl:value-of select="diag:details"/>
82 <xsl:template name="displaysearch">
83 <div class="searchresults">
84 <xsl:for-each select="srw:numberOfRecords">
86 <xsl:text>Number of Records: </xsl:text>
87 <xsl:value-of select="."/>
90 <xsl:for-each select="srw:records">
91 <xsl:for-each select="srw:record">
94 <xsl:text>Record: </xsl:text>
95 <xsl:value-of select="srw:recordPosition"/>
96 <xsl:text> : </xsl:text>
97 <xsl:value-of select="srw:recordSchema"/>
98 <xsl:text> : </xsl:text>
99 <xsl:value-of select="srw:recordPacking"/>
102 <xsl:if test="srw:recordPacking='string'">
104 <xsl:value-of select="srw:recordData"/>
107 <xsl:if test="srw:recordPacking='xml'">
109 <xsl:when test="srw:recordSchema='marcxml'">
110 <xsl:text>MARCXML</xsl:text>
112 <xsl:when test="srw:recordSchema='bibframe'">
113 <xsl:apply-templates select="srw:recordData"/>
118 <form name="rawlink" method="get">
119 <input type="hidden" name="version" value="1.2"/>
120 <input type="hidden" name="operation" value="searchRetrieve"/>
121 <input type="hidden" name="query">
122 <xsl:attribute name="value">
124 select="//srw:echoedSearchRetrieveRequest/srw:query"/>
127 <input type="hidden" name="recordPacking">
128 <xsl:attribute name="value">
129 <xsl:value-of select="srw:recordPacking"/>
132 <input type="hidden" name="recordSchema">
133 <xsl:attribute name="value">
134 <xsl:value-of select="srw:recordSchema"/>
137 <input type="hidden" name="startRecord">
138 <xsl:attribute name="value">
139 <xsl:value-of select="srw:recordPosition"/>
142 <input type="hidden" name="maximumRecords" value="1"/>
143 <input type="submit">
144 <xsl:attribute name="value">
145 <xsl:text>Raw Record </xsl:text>
146 <xsl:value-of select="srw:recordPosition"/>