Changeset 953
- Timestamp:
- 08/10/07 05:26:50 (1 year ago)
- Files:
-
- BibIt/trunk/mods2html.xsl (modified) (3 diffs)
- BibIt/trunk/modscoins.xsl (modified) (2 diffs)
- BibIt/trunk/modsdetails.xsl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
BibIt/trunk/mods2html.xsl
r944 r953 10 10 <xsl:import href="modsdetails.xsl"/> 11 11 <xsl:import href="modscoins.xsl"/> 12 <xsl:import href="searchforit.xsl"/> 12 13 13 14 <xsl:param name="htmloutpath">/badigit/scratch2/</xsl:param> 14 15 <xsl:param name="rightspath">/TomDocs/awmcwork/pleiadesact/svnbox/pleiades-bibliography/rights.html</xsl:param> 15 16 <xsl:output name="html-format" method="html" indent="yes" escape-uri-attributes="yes" 16 <xsl:param name="langspath">/TomDocs/awmcwork/pleiadesact/svnbox/BibIt/language-subtags.xml</xsl:param> 17 <xsl:variable name="langs" select="doc($langspath)/child::*[1]"/> 18 <!-- <xsl:output name="html-format" method="html" indent="yes" escape-uri-attributes="yes" 17 19 encoding="UTF-8" 18 20 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" 19 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" /> 20 21 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" /> --> 22 <!-- MSIE can't handle reality --> 23 <xsl:output name="html-format" method="xhtml" indent="yes" escape-uri-attributes="yes" 24 encoding="UTF-8" include-content-type="yes" omit-xml-declaration="yes" /> 21 25 <xsl:template match="/"> 22 26 <xsl:apply-templates /> … … 25 29 <xsl:template match="mods:mods"> 26 30 <xsl:variable name="thetitle"><xsl:call-template name="getbesttitle"/></xsl:variable> 31 <xsl:variable name="thedate" select="descendant::mods:recordChangeDate[last()]"/> 27 32 <xsl:result-document href="{$htmloutpath}{@ID}.html" format="html-format"> 28 <html xmlns="http://www.w3.org/1999/xhtml" >33 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 29 34 <head> 30 35 <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> 36 <xsl:element name="meta"> 37 <xsl:attribute name="http-equiv">last-modified</xsl:attribute> 38 <xsl:attribute name="content"><xsl:value-of select="normalize-space($thedate)"/></xsl:attribute> 39 </xsl:element> 40 <style type="text/css" media="screen"> @import "recordstyle.css"; </style> 31 41 <title><xsl:value-of select="normalize-space($thetitle)" /></title> 32 42 </head> 33 43 <body> 34 <h1><xsl:value-of select="normalize-space($thetitle)" /></h1> 35 <p>Last revised: <xsl:call-template name="now2text" /></p> 44 <div id="navigation"> 45 <a href="index.html">awmc bibliography</a>: <xsl:value-of select="@ID"/> 46 >> <a href="#details">details</a> 47 | <a href="{@ID}.xml">mods xml</a> 48 | <a href="#searchforit">find this work</a> 49 | <a href="#meta">about</a> 50 </div> 51 <div id="content"> 52 <h1><xsl:value-of select="normalize-space($thetitle)" /></h1> 53 <p>Last revised: <xsl:value-of select="$thedate"/></p> 36 54 <div id="formattedcitation"> 37 55 <h2>Formatted citation:</h2> 38 <ul> 39 <li></li> 40 </ul> 56 <p><xsl:copy-of select="mods:extension/html:div[@class='formatted-citation']/*"/></p> 41 57 </div> 42 58 <div id="details"> … … 57 73 <div id="meta"> 58 74 <h2>About this information:</h2> 59 <p>This bibliographic record was compiled by staff and affiliates 60 of the <a href="http://www.unc.edu/awmc/">Ancient World 61 Mapping Center</a> and its <a 62 href="http://pleiades.stoa.org">Pleiades Project</a>. The 63 information in it was compiled initially from citation 64 handlists and other unpublished working papers of the <a 65 href="http://www.unc.edu/depts/cl_atlas/">Classical Atlas 66 Project</a> (1988-2000). It was subsequently verified, 67 updated and expanded with reference to an actual copy of the 68 work cited, or (failing that) to at least 3 different online 69 library catalog systems. Where possible, information from 70 publishers' and authors' websites has also been consulted. 71 Relationships between works, reflected by links in the "full 72 details" sections of individual records, have been 73 programmatically calculated on the basis of textual 74 information in the original records. You should check 75 individual citations for accuracy before using them.</p> 76 75 <xsl:for-each select="descendant::mods:recordContentSource[1]"> 76 <p>This record originated at <xsl:value-of select="normalize-space(.)"/>.</p> 77 </xsl:for-each> 78 <xsl:for-each select="descendant::mods:recordCreationDate[1]"> 79 <p>Date of record creation: <xsl:value-of select="normalize-space(.)"/>.</p> 80 </xsl:for-each> 81 <p>Subsequent changes occurred on:</p> 82 <ul> 83 <xsl:for-each select="descendant::mods:recordChangeDate"> 84 <li><xsl:value-of select="normalize-space(.)"/></li> 85 </xsl:for-each> 86 </ul> 87 <xsl:for-each select="descendant::mods:recordOrigin[1]"> 88 <p><xsl:value-of select="normalize-space(.)"/></p> 89 </xsl:for-each> 90 <p>Accuracy is not guaranteed. Details of citations should be independently checked before 91 use or incorporation in another work.</p> 77 92 <xsl:for-each select="doc($rightspath)"> 78 93 <xsl:copy-of select="./descendant::html:body/html:p" /> 79 94 </xsl:for-each> 80 95 81 </div> 96 </div></div> 82 97 </body> 83 98 </html> BibIt/trunk/modscoins.xsl
r944 r953 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 2 <xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" 3 xmlns:html="http://www.w3.org/1999/xhtml" 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 5 xmlns:mods="http://www.loc.gov/mods/v3" 4 6 xmlns:xlink="http://www.w3.org/1999/xlink" … … 182 184 </xsl:template> 183 185 186 <xsl:template match="*" mode="coins"/> 184 187 185 188 </xsl:stylesheet> BibIt/trunk/modsdetails.xsl
r944 r953 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 2 <xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" 3 xmlns:html="http://www.w3.org/1999/xhtml" 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 5 xmlns:mods="http://www.loc.gov/mods/v3" 4 6 xmlns:xlink="http://www.w3.org/1999/xlink" … … 21 23 <xsl:otherwise>alternate title: </xsl:otherwise> 22 24 </xsl:choose><xsl:apply-templates select="mods:title" mode="details"/> 23 <xsl:if test="@xml:lang"><ul><li>language code for title, per 24 <a href="http://rfc.net/rfc4646.html">RFC4646</a>, September 2006 and the 25 <a href="http://www.iana.org/assignments/language-subtag-registry">IANA 26 Language Subtag Registry</a>: <xsl:value-of select=" @xml:lang"/></li></ul></xsl:if></li> 25 <xsl:if test="@xml:lang"><ul> 26 <xsl:variable name="thislang" select="normalize-space(@xml:lang)"/> 27 <xsl:choose> 28 <xsl:when test="contains(@xml:lang, '-')"> 29 <xsl:for-each select="tokenize(@xml:lang, '-')"> 30 <ul> 31 <xsl:for-each select="$langs/descendant::subtag[. = $thislang]/.."> 32 <li>title <xsl:value-of select="type"/>:<xsl:text> </xsl:text><xsl:value-of select="normalize-space(description)"/></li> 33 </xsl:for-each> 34 </ul> 35 </xsl:for-each> 36 </xsl:when> 37 <xsl:otherwise> 38 <xsl:variable name="matchedlang" select="$langs/descendant::subtag[. = $thislang]/.."/> 39 <li>title <xsl:value-of select="$matchedlang/type"/>:<xsl:text> </xsl:text><xsl:value-of select="normalize-space($matchedlang/description)"/></li> 40 </xsl:otherwise> 41 </xsl:choose> 42 </ul></xsl:if></li> 27 43 </xsl:template> 28 44 … … 72 88 73 89 74 <xsl:template match="mods:identifier[@type != 'isbn' and @type != 'issn' ]" mode="details">90 <xsl:template match="mods:identifier[@type != 'isbn' and @type != 'issn' and not(starts-with(., 'awmcbib'))]" mode="details"> 75 91 <li><xsl:value-of select="@type"/> identifier: <xsl:value-of select="."/></li> 76 92 </xsl:template> … … 103 119 <xsl:element name="a"> 104 120 <xsl:attribute name="href"><xsl:value-of select="$parent/@ID"/>.html</xsl:attribute> 105 <xsl:attribute name="title"><xsl:value-of select=" $parent/mods:titleInfo[@type='uniform'][1]/mods:title"/></xsl:attribute>121 <xsl:attribute name="title"><xsl:value-of select="normalize-space($parent/mods:titleInfo[@type='uniform'][1]/mods:title)"/></xsl:attribute> 106 122 <xsl:value-of select="$parenttitle"/></xsl:element> 107 123 </xsl:when> … … 109 125 <xsl:element name="a"> 110 126 <xsl:attribute name="href"><xsl:value-of select="$parent/@ID"/>.html</xsl:attribute> 111 <xsl:attribute name="title"><xsl:value-of select=" $parent/mods:titleInfo[@type='uniform'][1]/mods:title"/></xsl:attribute>127 <xsl:attribute name="title"><xsl:value-of select="normalize-space($parent/mods:titleInfo[@type='uniform'][1]/mods:title)"/></xsl:attribute> 112 128 <xsl:value-of select="$parenttitle"/></xsl:element> 113 129 <xsl:text> </xsl:text><xsl:if test="mods:part/mods:detail[@type='volume']"><xsl:value-of select="mods:part/mods:detail[@type='volume']"/></xsl:if> … … 118 134 <xsl:element name="a"> 119 135 <xsl:attribute name="href"><xsl:value-of select="$parent/@ID"/>.html</xsl:attribute> 120 <xsl:attribute name="title"><xsl:value-of select=" $parent/mods:titleInfo[@type='uniform']/mods:title"/></xsl:attribute>136 <xsl:attribute name="title"><xsl:value-of select="normalize-space($parent/mods:titleInfo[@type='uniform']/mods:title)"/></xsl:attribute> 121 137 <xsl:value-of select="$parenttitle"/></xsl:element> 122 138 <xsl:text> </xsl:text><xsl:if test="mods:part/mods:detail[@type='volume']"><xsl:value-of select="mods:part/mods:detail[@type='volume']"/></xsl:if> … … 126 142 <xsl:element name="a"> 127 143 <xsl:attribute name="href"><xsl:value-of select="$parent/@ID"/>.html</xsl:attribute> 128 <xsl:attribute name="title"><xsl:value-of select=" $parent/mods:titleInfo[@type='uniform']/mods:title"/></xsl:attribute>144 <xsl:attribute name="title"><xsl:value-of select="normalize-space($parent/mods:titleInfo[@type='uniform']/mods:title)"/></xsl:attribute> 129 145 <xsl:value-of select="$parenttitle"/></xsl:element> 130 146 <xsl:if test="mods:part/mods:detail[@type='volume']"><xsl:text> </xsl:text><xsl:value-of select="mods:part/mods:detail[@type='volume']"/></xsl:if>, … … 145 161 <li>note<xsl:for-each select="@type"><xsl:text> </xsl:text>(<xsl:value-of select="."/>)</xsl:for-each>:</li> 146 162 </xsl:template> 163 164 <xsl:template match="mods:recordInfo" mode="details"/> 165 <xsl:template match="mods:identifier[@type='local' and starts-with(., 'awmcbib')]" mode="details"/> 166 <xsl:template match="mods:extension" mode="details"/> 147 167 148 168 <xsl:template match="mods:*" mode="details">
