Changeset 870
- Timestamp:
- 08/02/07 10:26:17 (1 year ago)
- Files:
-
- BibIt/trunk/ProcModsCollection.xsl (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
BibIt/trunk/ProcModsCollection.xsl
r869 r870 25 25 ================================================================ --> 26 26 <xsl:param name="mapnum">999</xsl:param> 27 <xsl:param name="outpath">/monkeypox/</xsl:param> 27 <xsl:param name="outpath">/badigit/deathstar/</xsl:param> 28 <xsl:param name="outchunk">yes</xsl:param> 29 <xsl:param name="htmlout"></xsl:param> 30 <xsl:param name="modsout">mods/</xsl:param> 31 <xsl:param name="citout">citations/</xsl:param> 32 33 28 34 29 35 <!-- ================================================================ … … 49 55 50 56 <xsl:template match="/"> 51 <xsl:result-document href="{$outpath} batl{$mapnum}.html" format="toc-format" >57 <xsl:result-document href="{$outpath}{$htmlout}batl{$mapnum}.html" format="toc-format" > 52 58 <html xmlns="http://www.w3.org/1999/xhtml"> 53 59 <head> … … 75 81 <xsl:variable name="newid"><xsl:call-template name="makenewid"/></xsl:variable> 76 82 <xsl:variable name="thetitle"><xsl:call-template name="getbesttitle"/></xsl:variable> 83 <xsl:variable name="thisoutpath"><xsl:value-of select="$outpath"/><xsl:if test="string-length($outchunk) != 0 and $outchunk != 'no'"><xsl:value-of select="substring($newid, 1, 1)"/>/</xsl:if></xsl:variable> 84 <xsl:variable name="thisouturl"><xsl:if test="string-length($outchunk) != 0 and $outchunk != 'no'"><xsl:value-of select="substring($newid, 1, 1)"/>/</xsl:if></xsl:variable> 77 85 <xsl:element name="li"> 78 86 <xsl:attribute name="id"><xsl:value-of select="$newid"/></xsl:attribute> … … 81 89 <xsl:element name="a"> 82 90 <xsl:attribute name="class">abbreviatedtitle</xsl:attribute> 83 <xsl:attribute name="href"><xsl:value-of select="$ newid"/>.html</xsl:attribute>91 <xsl:attribute name="href"><xsl:value-of select="$thisouturl"/><xsl:value-of select="$newid"/>.html</xsl:attribute> 84 92 <xsl:if test="mods:titleInfo[@type='abbreviated' and @xml:lang]"><xsl:copy-of select="mods:titleInfo[@type='abbreviated']/@xml:lang"/></xsl:if> 85 93 <xsl:if test="mods:titleInfo[@type='uniform']"> … … 91 99 <xsl:element name="a"> 92 100 <xsl:attribute name="class">uniformtitle</xsl:attribute> 93 <xsl:attribute name="href"><xsl:value-of select="$ newid"/>.html</xsl:attribute>101 <xsl:attribute name="href"><xsl:value-of select="$thisouturl"/><xsl:value-of select="$newid"/>.html</xsl:attribute> 94 102 <xsl:if test="mods:titleInfo[@type='uniform' and @xml:lang]"><xsl:copy-of select="mods:titleInfo[@type='uniform']/@xml:lang"/></xsl:if> 95 103 <xsl:value-of select="mods:titleInfo[@type='uniform'][1]/mods:title"/></xsl:element> … … 102 110 </xsl:element> 103 111 104 <xsl:result-document href="{$outpath}{$newid}.xml" format="mods-format"> 112 113 <xsl:result-document href="{$thisoutpath}{$modsout}{$newid}.xml" format="mods-format"> 105 114 <!-- create the separate mods xml file --> 106 115 <xsl:apply-templates select="." mode="copy"/> 107 116 </xsl:result-document> 108 117 109 <xsl:result-document href="{$ outpath}citations/{$newid}.xml"118 <xsl:result-document href="{$thisoutpath}{$citout}{$newid}.xml" 110 119 format="citation-format"> 111 120 <!-- create separate file to hold formatted citation --> … … 119 128 120 129 121 <xsl:result-document href="{$ outpath}{$newid}.html" format="record-format" >130 <xsl:result-document href="{$thisoutpath}{$htmlout}{$newid}.html" format="record-format" > 122 131 <!-- create a separate html file --> 123 132 <html xmlns="http://www.w3.org/1999/xhtml"> … … 145 154 <h2>Alternate formats:</h2> 146 155 <xsl:apply-templates select="." mode="coins"/> 147 <p id="modsxml">MODS XML file: <a href="{$newid}.xml"><xsl:value-of select="$newid"/>.xml</a></p> 156 <xsl:variable name="modsrelurl"><xsl:for-each select="tokenize($htmlout, '/')">../</xsl:for-each><xsl:if test="$outchunk != '' and $outchunk != 'no'">../</xsl:if></xsl:variable> 157 <p id="modsxml">MODS XML file: <a href="{$modsrelurl}{$thisouturl}{$modsout}{$newid}.xml"><xsl:value-of select="$newid"/>.xml</a></p> 148 158 </div> 149 159 <div id="searchforit"> … … 160 170 at least 3 different online library catalog systems. Where possible, information from publishers' and authors' websites has 161 171 also been consulted.</p> 162 172 173 <xsl:variable name="rightsrelurl"><xsl:for-each select="tokenize($htmlout, '/')">../</xsl:for-each><xsl:if test="$outchunk != '' and $outchunk != 'no'">../</xsl:if></xsl:variable> 174 163 175 <p>We encourage you, in accordance with standard scholarly practice, to cite the source of this data if you copy and 164 176 redistribute it en masse. Use of individual citations in articles, papers and books need not be cited, but you should 165 check them yourself for accuracy. <a href=" rights.html">This177 check them yourself for accuracy. <a href="{$rightsrelurl}rights.html">This 166 178 data is in 167 179 the public domain</a>.</p> … … 197 209 <xsl:copy> 198 210 <xsl:apply-templates select="@*" mode="copy"/> 211 <xsl:text> 212 213 </xsl:text><xsl:comment>About this information: 214 215 This bibliographic record was compiled by staff and affiliates of the Ancient 216 World Mapping Center (http://www.unc.edu/awmc/) and its Pleiades Project 217 (http://pleiades.stoa.org). The information in it was compiled initially from 218 citation handlists and other unpublished working papers of the Classical Atlas 219 Project (1988-2000). It was subsequently verified, updated and expanded with 220 reference to an actual copy of the work cited, or (failing that) to at least 3 221 different online library catalog systems. Where possible, information from 222 publishers' and authors' websites has also been consulted. 223 224 We encourage you, in accordance with standard scholarly practice, to cite the 225 source of this data if you copy and redistribute it en masse. Use of individual 226 citations in articles, papers and books need not be cited, but you should check 227 them yourself for accuracy. 228 229 <xsl:variable name="docpath">file://<xsl:value-of select="$outpath"/>rights.html</xsl:variable> 230 <xsl:for-each select="doc($docpath)"><xsl:for-each select="./descendant::html:body/html:p"> 231 <xsl:value-of select="."/><xsl:text> 232 233 </xsl:text> 234 </xsl:for-each></xsl:for-each> 235 236 </xsl:comment> 199 237 <xsl:apply-templates mode="copy"/> 200 238 <xsl:element name="mods:identifier"> … … 351 389 352 390 <xsl:template match="mods:titleInfo" mode="details"> 353 <li><xsl:value-of select="@type"/> title: <xsl:apply-templates select="mods:title" mode="details"/></li> 391 <li><xsl:choose> 392 <xsl:when test="@type = 'uniform'">full title: </xsl:when> 393 <xsl:when test="@type = 'abbreviated'">short title: </xsl:when> 394 <xsl:otherwise>alternate title: </xsl:otherwise> 395 </xsl:choose><xsl:apply-templates select="mods:title" mode="details"/></li> 354 396 <xsl:if test="@xml:lang"><li>title language (xml:lang): <xsl:value-of select=" @xml:lang"/></li></xsl:if> 355 397 </xsl:template> … … 401 443 <xsl:variable name="parenttitle"><xsl:for-each select="$parent"><xsl:call-template name="getbesttitle"/></xsl:for-each></xsl:variable> 402 444 <xsl:variable name="parentnewid"><xsl:for-each select="$parent"><xsl:call-template name="makenewid"/></xsl:for-each></xsl:variable> 445 <xsl:variable name="parentrelurl"><xsl:for-each select="tokenize($htmlout, '/')">../</xsl:for-each><xsl:if test="$outchunk != '' and $outchunk != 'no'">../</xsl:if></xsl:variable> 446 <xsl:variable name="parentouturl"><xsl:value-of select="$parentrelurl"/><xsl:if test="string-length($outchunk) != 0 and $outchunk != 'no'"><xsl:value-of select="substring($parentnewid, 1, 1)"/>/</xsl:if></xsl:variable> 403 447 <xsl:choose> 404 448 <xsl:when test="$childgenre='volume' and mods:part/mods:detail[@type='volume']">this work is volume <xsl:value-of select="mods:part/mods:detail[@type='volume']"/> of: … … 410 454 <xsl:when test="$parentgenre = 'journal'">appears in journal issue: 411 455 <xsl:element name="a"> 412 <xsl:attribute name="href"><xsl:value-of select="$parent newid"/>.html</xsl:attribute>456 <xsl:attribute name="href"><xsl:value-of select="$parentouturl"/><xsl:value-of select="$htmlout"/><xsl:value-of select="$parentnewid"/>.html</xsl:attribute> 413 457 <xsl:attribute name="title"><xsl:value-of select="$parent/mods:titleInfo[@type='uniform']/mods:title"/></xsl:attribute> 414 458 <xsl:value-of select="$parenttitle"/></xsl:element> … … 419 463 <xsl:when test="$parentgenre='series'">series: 420 464 <xsl:element name="a"> 421 <xsl:attribute name="href"><xsl:value-of select="$parent newid"/>.html</xsl:attribute>465 <xsl:attribute name="href"><xsl:value-of select="$parentouturl"/><xsl:value-of select="$htmlout"/><xsl:value-of select="$parentnewid"/>.html</xsl:attribute> 422 466 <xsl:attribute name="title"><xsl:value-of select="$parent/mods:titleInfo[@type='uniform']/mods:title"/></xsl:attribute> 423 467 <xsl:value-of select="$parenttitle"/></xsl:element> … … 427 471 <xsl:when test="$parentgenre='collection'">appears in the collection: 428 472 <xsl:element name="a"> 429 <xsl:attribute name="href"><xsl:value-of select="$parent newid"/>.html</xsl:attribute>473 <xsl:attribute name="href"><xsl:value-of select="$parentouturl"/><xsl:value-of select="$htmlout"/><xsl:value-of select="$parentnewid"/>.html</xsl:attribute> 430 474 <xsl:attribute name="title"><xsl:value-of select="$parent/mods:titleInfo[@type='uniform']/mods:title"/></xsl:attribute> 431 475 <xsl:value-of select="$parenttitle"/></xsl:element>
