www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 8242acd067b91353a56c355803dbe283094ee293
parent fb1a49ece9361a973a3837d7ac1c45f32bced14e
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 14 Feb 2011 23:21:57 +0000

update citeproc-js to 1.0.113

From Frank's release notes:

Apply formatting set on family name parts to institutions as well.


Diffstat:
Mchrome/content/zotero/xpcom/citeproc.js | 24++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js @@ -227,6 +227,12 @@ var CSL = { "@vertical-align", "@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", ROMAN_NUMERALS: [ [ "", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix" ], @@ -434,7 +440,7 @@ CSL_E4X.prototype.insertChildNodeAfter = function (parent,node,pos,datexml) { return parent; }; 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({}); institution_long = <institution institution-parts="long" @@ -446,10 +452,24 @@ CSL_E4X.prototype.addInstitutionNodes = function(myxml) { delimiter=", " substitute-use-first="1" use-last="1"/>; + name_part = <name-part />; for each (node in myxml..names) { if ("xml" == typeof node && node.elements("name").length() > 0) { if (!node.institution.toString()) { 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) { var attrs, langspec, localexml, locale; - this.processor_version = "1.0.112"; + this.processor_version = "1.0.113"; this.csl_version = "1.0"; this.sys = sys; this.sys.xml = new CSL.System.Xml.Parsing();