From 98bf76eb44cfd8565ba7aa316ee6f78f3723f971 Mon Sep 17 00:00:00 2001 From: Julian Onions Date: Wed, 19 Dec 2007 16:44:40 +0000 Subject: [PATCH] Change to the new schema, is-numeric and is-date style. is-date doesn't really work correctly as yet. --- chrome/content/zotero/xpcom/cite.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index 572120ec4..644762501 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -978,7 +978,7 @@ Zotero.CSL.prototype._processElements = function(item, element, formattedString, } } else if(child.@macro.length()) { var macro = this._csl.macro.(@name == child.@macro); - if(!macro.length()) throw "CSL: style references undefined macro"; + if(!macro.length()) throw "CSL: style references undefined macro " + child.@macro; // If not ignored (bc already used as a substitution) if(!ignore[1][child.@macro.toString()]) { @@ -1215,8 +1215,6 @@ Zotero.CSL.prototype._processElements = function(item, element, formattedString, var matchAny = newChild.@match == "any"; var matchNone = newChild.@match == "none"; - var matchNumber = newChild.@datatype == "number"; - var matchDate = newChild.@datatype == "date"; if(matchAny) { // if matching any, begin with false, then set to true // if a condition is true @@ -1229,7 +1227,7 @@ Zotero.CSL.prototype._processElements = function(item, element, formattedString, // inspect variables var done = false; - var attributes = ["variable", "type", "disambiguate", "locator", "position"]; + var attributes = ["variable", "is-date", "is-numeric", "type", "disambiguate", "locator", "position"]; for(var k=0; !done && k