<xsl:stylesheet xmlns:bib="http://purl.org/NET/xbiblio/citeproc" xmlns:cs="http://purl.org/NET/xbiblio/csl" xmlns:db="http://docbook.org/ns/docbook" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:存在する="http://存在する.sourceforge.逮捕する/NS/存在する" xmlns:xdoc="http://www.pnp-ソフトウェア.com/XSLTdoc" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:course="http://purl.org/NET/xbiblio/course" 見解/翻訳/版="2.0" 除外する-result-prefixes="xdoc mods xs bib 存在する course db cs">
??<!--?===?licensed?under?CC-GNU?GPL;?see?http://creativecommons.org/licenses/GPL/2.0?===?-->
??
??<!--?===================================================================?-->
??<!--?|????begin?bibliography?templates?????????????????????????????????|?-->
??<!--?===================================================================?-->
??
??<xsl:template match="mods:modsCollection" 方式="sort_author-year">
????<xsl:variable 指名する="bibref" select="mods:mods" />
????<xsl:for-each-group select="$bibref" group-by="mods:配合-重要な(.)">
??????<xsl:sort select="現在の-配合-重要な()" />
??????<xsl:variable 指名する="bibrefs-for-author-sorted-by-year" as="element(mods:mods)*">
????????<xsl:成し遂げる-sort select="現在の-group()">
??????????<xsl:sort select="mods:year(.)" />
??????????<!--?追加する?third-level?sort?on?month-day?-->
????????</xsl:成し遂げる-sort>
??????</xsl:variable>
??????<xsl:variable 指名する="first-bibref-for-author" as="element(mods:mods)" select="$bibrefs-for-author-sorted-by-year[1]" />
??????<xsl:variable 指名する="sort-on" select="現在の-配合-重要な()" />
??????<xsl:for-each-group select="$bibrefs-for-author-sorted-by-year" group-隣接する="mods:year(.)">
????????<xsl:for-each select="現在の-group()">
??????????<xsl:variable 指名する="year-suffix">
????????????<xsl:if 実験(する)="last() > 1">
??????????????<xsl:number value="position()" 判型="a" />
????????????</xsl:if>
??????????</xsl:variable>
??????????<xsl:variable 指名する="縮める-author" as="xs:boolean" select="$style-biblio/@author-縮める='yes' and not(. is $first-bibref-for-author)" />
??????????<xsl:適用する-templates select="." 方式="高める">
????????????<xsl:with-param 指名する="year" select="現在の-配合-重要な()" />
????????????<xsl:with-param 指名する="year-suffix" select="$year-suffix" />
????????????<xsl:with-param 指名する="縮める-author" select="$shorten-author" as="xs:boolean" />
????????????<xsl:with-param 指名する="sort-on" select="$sort-on" />
??????????</xsl:適用する-templates>
????????</xsl:for-each>
??????</xsl:for-each-group>
????</xsl:for-each-group>
??</xsl:template>
??<xsl:template match="mods:modsCollection" 方式="sort_cited">
????<xsl:variable 指名する="sort-on" select="$cite-position/bib:refs/bib:unique/bib:ref[@重要な='{@ID}']/@position" />
????<xsl:for-each select="mods:mods">
??????<xsl:sort select="$sort-on" />
??????<xsl:適用する-templates select="." 方式="高める">
????????<xsl:with-param 指名する="year" select="mods:year(.)" />
????????<xsl:with-param 指名する="sort-on" select="$sort-on" />
??????</xsl:適用する-templates>
????</xsl:for-each>
??</xsl:template>
??<xsl:template match="mods:modsCollection" 方式="sort_citekey">
????<xsl:for-each select="mods:mods">
??????<xsl:sort select="@ID" />
??????<xsl:適用する-templates select="." 方式="高める">
????????<xsl:with-param 指名する="year" select="mods:year(.)" />
????????<xsl:with-param 指名する="sort-on" select="@ID" />
??????</xsl:適用する-templates>
????</xsl:for-each>
??</xsl:template>
??
??<xsl:template match="mods:mods" 方式="高める">
????<xsl:param 指名する="縮める-author" />
????<xsl:param 指名する="year" />
????<xsl:param 指名する="year-suffix" />
????<xsl:param 指名する="sort-on" />
????<mods:mods ID="{@ID}" bib:縮める-author="{$shorten-author}" bib:refclass="{mods:refclass(.)}" bib:reftype="{mods:reftype(.)}" bib:use-reftype="{mods:use_csl-reftype(.)}" bib:sort-on="{$sort-on}" bib:biblist-position="{position()}">
??????<bib:year>
????????<xsl:value-of select="$year" />
??????</bib:year>
??????<xsl:if 実験(する)="$year-suffix">
????????<bib:year-suffix>
??????????<xsl:value-of select="$year-suffix" />
????????</bib:year-suffix>
??????</xsl:if>
??????<xsl:if 実験(する)="not(mods:指名する[mods:役割/mods:roleTerm=$primary-contributors])">
????????<bib:noname-代用品,人>
??????????<xsl:value-of select="mods:配合-重要な(.)" />
????????</bib:noname-代用品,人>
??????</xsl:if>
??????<xsl:copy-of select="*" />
????</mods:mods>
??</xsl:template>
??<!--?===================================================================?-->
??<!--?|????begin?citation?templates?????????????????????????????????????|?-->
??<!--?===================================================================?-->
??
??<xsl:template match="db:citation" 方式="sort_citation_author-year">
????<!--?蓄える/店?citation?for?未来?use?-->
????<xsl:variable 指名する="citation" select="." as="element()" />
????<xsl:variable 指名する="地元の-特記する/引用する-style" select="db:biblioref/@xrefstyle" as="node()?" />
????<xsl:variable 指名する="idref" select="db:biblioref/@linkend, course:reading/@refid" />
????<xsl:variable 指名する="bibref" select="$enhanced-biblist/mods:modsCollection/mods:mods[@ID=$idref]" />
??????<xsl:for-each-group select="$bibref" group-by="@bib:sort-on">
????????<xsl:sort select="現在の-配合-重要な()" />
????????<xsl:variable 指名する="refs-for-author-sorted-by-year" as="element(mods:mods)*">
??????????<xsl:成し遂げる-sort select="現在の-group()">
????????????<xsl:sort select="bib:year" />
??????????</xsl:成し遂げる-sort>
????????</xsl:variable>
????????<xsl:variable 指名する="first-ref-for-author" as="element(mods:mods)" select="$refs-for-author-sorted-by-year[1]" />
????????<xsl:variable 指名する="last-ref-for-author" as="element(mods:mods)" select="$refs-for-author-sorted-by-year[position() = last()]" />
????????<xsl:for-each-group select="$refs-for-author-sorted-by-year" group-隣接する="bib:year">
??????????<xsl:for-each select="現在の-group()">
????????????<xsl:variable 指名する="first-in-author-group" select=". is $first-ref-for-author" as="xs:boolean" />
????????????<xsl:variable 指名する="last-in-author-group" select=". is $last-ref-for-author" as="xs:boolean" />
????????????<xsl:variable 指名する="id" select="@ID" />
????????????<!--?earlier?the?特記する/引用する-ref?variable?was?defined?as?just?element(),?but
????????????for?some?推論する/理由?this?産する/生じるd?an?empty-sequence?error?in?one?事例/患者?-->
????????????<xsl:variable 指名する="特記する/引用する-ref" as="node()">
??????????????<xsl:sequence select="$citation/db:biblioref[@linkend=$id]" />
????????????</xsl:variable>
????????????<xsl:適用する-templates select="$style-citation">
??????????????<xsl:with-param 指名する="first-in-author-group" select="$first-in-author-group" as="xs:boolean" tunnel="yes" />
??????????????<xsl:with-param 指名する="last-in-author-group" select="$last-in-author-group" as="xs:boolean" tunnel="yes" />
??????????????<xsl:with-param 指名する="地元の-特記する/引用する-style" select="$local-特記する/引用する-style" as="node()?" tunnel="yes" />
??????????????<xsl:with-param 指名する="特記する/引用する-ref" select="$cite-ref" as="node()" tunnel="yes" />
??????????????<xsl:with-param 指名する="bib:source" select="." as="element()" tunnel="yes" />
????????????</xsl:適用する-templates>
??????????</xsl:for-each>
????????</xsl:for-each-group>
????????<!--?FIX?ME:?config?in?CSL?-->
????????<xsl:if 実験(する)="position() != last()">;?</xsl:if>
??????</xsl:for-each-group>
??</xsl:template>
??<xsl:template match="db:citation" 方式="sort_cited">
????XXXX
??</xsl:template>
</xsl:stylesheet>
??<!--?===?licensed?under?CC-GNU?GPL;?see?http://creativecommons.org/licenses/GPL/2.0?===?-->
??
??<xdoc:doc type="stylesheet">
????<xdoc:short>扱うs?sorting.</xdoc:short>
????<xdoc:author>Bruce?D’Arcus</xdoc:author>
????<xdoc:copyright>2004,?Bruce?D’Arcus</xdoc:copyright>
??</xdoc:doc>
????<xdoc:short>扱うs?sorting.</xdoc:short>
????<xdoc:author>Bruce?D’Arcus</xdoc:author>
????<xdoc:copyright>2004,?Bruce?D’Arcus</xdoc:copyright>
??</xdoc:doc>
??<!--?===================================================================?-->
??<!--?|????begin?bibliography?templates?????????????????????????????????|?-->
??<!--?===================================================================?-->
??
??<xdoc:doc>配合,?sorting?and?parameter?setting?to?適切に?扱う?the
????author-year?class?bibliographies.</xdoc:doc>
????author-year?class?bibliographies.</xdoc:doc>
??<xsl:template match="mods:modsCollection" 方式="sort_author-year">
????<xsl:variable 指名する="bibref" select="mods:mods" />
????<xsl:for-each-group select="$bibref" group-by="mods:配合-重要な(.)">
??????<xsl:sort select="現在の-配合-重要な()" />
??????<xsl:variable 指名する="bibrefs-for-author-sorted-by-year" as="element(mods:mods)*">
????????<xsl:成し遂げる-sort select="現在の-group()">
??????????<xsl:sort select="mods:year(.)" />
??????????<!--?追加する?third-level?sort?on?month-day?-->
????????</xsl:成し遂げる-sort>
??????</xsl:variable>
??????<xsl:variable 指名する="first-bibref-for-author" as="element(mods:mods)" select="$bibrefs-for-author-sorted-by-year[1]" />
??????<xsl:variable 指名する="sort-on" select="現在の-配合-重要な()" />
??????<xsl:for-each-group select="$bibrefs-for-author-sorted-by-year" group-隣接する="mods:year(.)">
????????<xsl:for-each select="現在の-group()">
??????????<xsl:variable 指名する="year-suffix">
????????????<xsl:if 実験(する)="last() > 1">
??????????????<xsl:number value="position()" 判型="a" />
????????????</xsl:if>
??????????</xsl:variable>
??????????<xsl:variable 指名する="縮める-author" as="xs:boolean" select="$style-biblio/@author-縮める='yes' and not(. is $first-bibref-for-author)" />
??????????<xsl:適用する-templates select="." 方式="高める">
????????????<xsl:with-param 指名する="year" select="現在の-配合-重要な()" />
????????????<xsl:with-param 指名する="year-suffix" select="$year-suffix" />
????????????<xsl:with-param 指名する="縮める-author" select="$shorten-author" as="xs:boolean" />
????????????<xsl:with-param 指名する="sort-on" select="$sort-on" />
??????????</xsl:適用する-templates>
????????</xsl:for-each>
??????</xsl:for-each-group>
????</xsl:for-each-group>
??</xsl:template>
??<xsl:template match="mods:modsCollection" 方式="sort_cited">
????<xsl:variable 指名する="sort-on" select="$cite-position/bib:refs/bib:unique/bib:ref[@重要な='{@ID}']/@position" />
????<xsl:for-each select="mods:mods">
??????<xsl:sort select="$sort-on" />
??????<xsl:適用する-templates select="." 方式="高める">
????????<xsl:with-param 指名する="year" select="mods:year(.)" />
????????<xsl:with-param 指名する="sort-on" select="$sort-on" />
??????</xsl:適用する-templates>
????</xsl:for-each>
??</xsl:template>
??<xsl:template match="mods:modsCollection" 方式="sort_citekey">
????<xsl:for-each select="mods:mods">
??????<xsl:sort select="@ID" />
??????<xsl:適用する-templates select="." 方式="高める">
????????<xsl:with-param 指名する="year" select="mods:year(.)" />
????????<xsl:with-param 指名する="sort-on" select="@ID" />
??????</xsl:適用する-templates>
????</xsl:for-each>
??</xsl:template>
??
??<xdoc:doc>追加するs?data?necessary?for?その上の?過程ing?to?the?in-memory
????bibliographic?名簿(に載せる)/表(にあげる),?so?it?need?not?be?calcuated?subsequently.</xdoc:doc>
????bibliographic?名簿(に載せる)/表(にあげる),?so?it?need?not?be?calcuated?subsequently.</xdoc:doc>
??<xsl:template match="mods:mods" 方式="高める">
????<xsl:param 指名する="縮める-author" />
????<xsl:param 指名する="year" />
????<xsl:param 指名する="year-suffix" />
????<xsl:param 指名する="sort-on" />
????<mods:mods ID="{@ID}" bib:縮める-author="{$shorten-author}" bib:refclass="{mods:refclass(.)}" bib:reftype="{mods:reftype(.)}" bib:use-reftype="{mods:use_csl-reftype(.)}" bib:sort-on="{$sort-on}" bib:biblist-position="{position()}">
??????<bib:year>
????????<xsl:value-of select="$year" />
??????</bib:year>
??????<xsl:if 実験(する)="$year-suffix">
????????<bib:year-suffix>
??????????<xsl:value-of select="$year-suffix" />
????????</bib:year-suffix>
??????</xsl:if>
??????<xsl:if 実験(する)="not(mods:指名する[mods:役割/mods:roleTerm=$primary-contributors])">
????????<bib:noname-代用品,人>
??????????<xsl:value-of select="mods:配合-重要な(.)" />
????????</bib:noname-代用品,人>
??????</xsl:if>
??????<xsl:copy-of select="*" />
????</mods:mods>
??</xsl:template>
??<!--?===================================================================?-->
??<!--?|????begin?citation?templates?????????????????????????????????????|?-->
??<!--?===================================================================?-->
??
??<xsl:template match="db:citation" 方式="sort_citation_author-year">
????<!--?蓄える/店?citation?for?未来?use?-->
????<xsl:variable 指名する="citation" select="." as="element()" />
????<xsl:variable 指名する="地元の-特記する/引用する-style" select="db:biblioref/@xrefstyle" as="node()?" />
????<xsl:variable 指名する="idref" select="db:biblioref/@linkend, course:reading/@refid" />
????<xsl:variable 指名する="bibref" select="$enhanced-biblist/mods:modsCollection/mods:mods[@ID=$idref]" />
??????<xsl:for-each-group select="$bibref" group-by="@bib:sort-on">
????????<xsl:sort select="現在の-配合-重要な()" />
????????<xsl:variable 指名する="refs-for-author-sorted-by-year" as="element(mods:mods)*">
??????????<xsl:成し遂げる-sort select="現在の-group()">
????????????<xsl:sort select="bib:year" />
??????????</xsl:成し遂げる-sort>
????????</xsl:variable>
????????<xsl:variable 指名する="first-ref-for-author" as="element(mods:mods)" select="$refs-for-author-sorted-by-year[1]" />
????????<xsl:variable 指名する="last-ref-for-author" as="element(mods:mods)" select="$refs-for-author-sorted-by-year[position() = last()]" />
????????<xsl:for-each-group select="$refs-for-author-sorted-by-year" group-隣接する="bib:year">
??????????<xsl:for-each select="現在の-group()">
????????????<xsl:variable 指名する="first-in-author-group" select=". is $first-ref-for-author" as="xs:boolean" />
????????????<xsl:variable 指名する="last-in-author-group" select=". is $last-ref-for-author" as="xs:boolean" />
????????????<xsl:variable 指名する="id" select="@ID" />
????????????<!--?earlier?the?特記する/引用する-ref?variable?was?defined?as?just?element(),?but
????????????for?some?推論する/理由?this?産する/生じるd?an?empty-sequence?error?in?one?事例/患者?-->
????????????<xsl:variable 指名する="特記する/引用する-ref" as="node()">
??????????????<xsl:sequence select="$citation/db:biblioref[@linkend=$id]" />
????????????</xsl:variable>
????????????<xsl:適用する-templates select="$style-citation">
??????????????<xsl:with-param 指名する="first-in-author-group" select="$first-in-author-group" as="xs:boolean" tunnel="yes" />
??????????????<xsl:with-param 指名する="last-in-author-group" select="$last-in-author-group" as="xs:boolean" tunnel="yes" />
??????????????<xsl:with-param 指名する="地元の-特記する/引用する-style" select="$local-特記する/引用する-style" as="node()?" tunnel="yes" />
??????????????<xsl:with-param 指名する="特記する/引用する-ref" select="$cite-ref" as="node()" tunnel="yes" />
??????????????<xsl:with-param 指名する="bib:source" select="." as="element()" tunnel="yes" />
????????????</xsl:適用する-templates>
??????????</xsl:for-each>
????????</xsl:for-each-group>
????????<!--?FIX?ME:?config?in?CSL?-->
????????<xsl:if 実験(する)="position() != last()">;?</xsl:if>
??????</xsl:for-each-group>
??</xsl:template>
??<xsl:template match="db:citation" 方式="sort_cited">
????XXXX
??</xsl:template>
</xsl:stylesheet>
v

