update citeproc-js to 1.0.113

From Frank's release notes:

Apply formatting set on family name parts to institutions as well.
This commit is contained in:
Simon Kornblith 2011-02-14 23:21:57 +00:00
parent fb1a49ece9
commit 8242acd067

View File

@ -227,6 +227,12 @@ var CSL = {
"@vertical-align", "@vertical-align",
"@quotes" "@quotes"
], ],
INSTITUTION_KEYS: [
"font-style",
"font-variant",
"font-weight",
"text-decoration"
],
SUFFIX_CHARS: "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z", SUFFIX_CHARS: "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z",
ROMAN_NUMERALS: [ ROMAN_NUMERALS: [
[ "", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix" ], [ "", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix" ],
@ -434,7 +440,7 @@ CSL_E4X.prototype.insertChildNodeAfter = function (parent,node,pos,datexml) {
return parent; return parent;
}; };
CSL_E4X.prototype.addInstitutionNodes = function(myxml) { CSL_E4X.prototype.addInstitutionNodes = function(myxml) {
var institution_long, institution_short, children, node, xml; var institution_long, institution_short, name_part, children, node, xml;
default xml namespace = "http://purl.org/net/xbiblio/csl"; with({}); default xml namespace = "http://purl.org/net/xbiblio/csl"; with({});
institution_long = <institution institution_long = <institution
institution-parts="long" institution-parts="long"
@ -446,10 +452,24 @@ CSL_E4X.prototype.addInstitutionNodes = function(myxml) {
delimiter=", " delimiter=", "
substitute-use-first="1" substitute-use-first="1"
use-last="1"/>; use-last="1"/>;
name_part = <name-part />;
for each (node in myxml..names) { for each (node in myxml..names) {
if ("xml" == typeof node && node.elements("name").length() > 0) { if ("xml" == typeof node && node.elements("name").length() > 0) {
if (!node.institution.toString()) { if (!node.institution.toString()) {
node.name += institution_long; node.name += institution_long;
for each (var attr in CSL.INSTITUTION_KEYS) {
if (node.name.@[attr].toString()) {
node.institution.@[attr] = node.name.@[attr].toString();
}
}
if (node.name['name-part'] && node.name['name-part'].@name.toString() === 'family') {
node.name += name_part;
for each (var attr in CSL.INSTITUTION_KEYS) {
if (node.name['name-part'].@[attr].toString()) {
node.institution.@[attr] = node.name['name-part'].@[attr].toString();
}
}
}
} }
} }
} }
@ -1732,7 +1752,7 @@ CSL.DateParser = function (txt) {
}; };
CSL.Engine = function (sys, style, lang, forceLang) { CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale; var attrs, langspec, localexml, locale;
this.processor_version = "1.0.112"; this.processor_version = "1.0.113";
this.csl_version = "1.0"; this.csl_version = "1.0";
this.sys = sys; this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing(); this.sys.xml = new CSL.System.Xml.Parsing();