Opened 5 years ago

Closed 5 years ago

#1854 closed defect (fixed)

XML mode import issues

Reported by: ajlyon Owned by: ajlyon
Priority: critical Milestone:
Component: translators Version: 2.1
Keywords: Cc: simon

Description

Running the MODS.js translator (new one from ticket #1825 or the old one) in Scaffold (latest Bitbucket) with Zotero Multilingual (but trunk is probably the same), I get:

16:32:42 Detect using MODS failed: 
         message => Zotero.getXML is not a function
         fileName => chrome://zotero/content/xpcom/translation/translate_firefox.js
         lineNumber => 133
         stack => detectImport()@chrome://zotero/content/xpcom/translation/translate_firefox.js:133
         @:0

This is easily fixed by manually inserting the Zotero.getXML(..) definition from translate.js:

Zotero.getXML = function() {
   var xml = Zotero._getXML();
   if(typeof xml == 'string') return new XML(xml);
 };

But then I get the error:

16:29:43 Translation using MODS failed: 
         message => reference to undefined XML name @type
         fileName => chrome://zotero/content/xpcom/translation/translate_firefox.js
         lineNumber => 867
         stack => doImport()@chrome://zotero/content/xpcom/translation/translate_firefox.js:867
         @:0

I'm not sure what's causing this one, but it's preventing me from using MODS.js. It is not the case that E4X is completely broken, since I can still use CTX.js, which also uses E4X, albeit in much simpler ways.

Change History (1)

comment:1 Changed 5 years ago by simon

  • Resolution set to fixed
  • Status changed from new to closed

In [9771]:

Closes #1854, XML mode import issues

Note: See TracTickets for help on using tickets.