X hits on this document

576 views

0 shares

1 downloads

0 comments

136 / 142

An Introduction to the Search/Retrieve URL Service (SRU)

<record> <recordSchema>info:srw/schema/1/dc-v1.1</recordSchema> <recordPacking>xml</recordPacking> <recordData> <dc> <title>The bottom dog</title> <coverage> Microforms [Lower Level HESB] General Collection Microfilm 3639 v.1:no.1 (1917:Oct. 20)-v.1:no.5 (1917:Nov. 17) </coverage> </dc> </recordData> </record> <record> <recordSchema>info:srw/schema/1/dc-v1.1</recordSchema> <recordPacking>xml</recordPacking> <recordData> <dc> <title>Dog world</title> <identifier> http://sfx.nd.edu:8889/ndu_local?genre=article&amp;amp; sid=ND:ejl_loc&amp;amp;issn=0012-4893 </identifier> <coverage> EBSCO MasterFILE Premier:Full Text (Availability: from 1998) </coverage> </dc> </recordData> </record> </records> </searchRetrieveResponse>

A nifty feature of SRW/U is the optional specification of an XSLT stylesheet by the user agent for trans- forming the XML output. If a stylesheet is not specified, then the server can specify a stylesheet. This is how the Journal Locator is implemented. The XML is returned and transformed using the stylesheet defined in the second line of the output, the XML processing instruction pointing to 'etc/search.xsl'. Here is the part of that stylesheet rendering the XML into an ordered list of titles, holdings, and locations:

<ol> <xsl:for-each select='//dc'> <li> <xsl:value-of select='title' /> <ul> <xsl:for-each select='coverage'> <xsl:choose> <xsl:when test='../identifier'> <li class='holding'> <a> <xsl:attribute name='href'> <xsl:value-of select='../identifier' /> </xsl:attribute> < x s l : v a l u e - o f s e l e c t = ' . ' / </a> </li> </xsl:when> <xsl:otherwise> >

128

Document info
Document views576
Page views582
Page last viewedSat Jan 21 03:10:43 UTC 2017
Pages142
Paragraphs3126
Words34660

Comments