Closed dstillman closed 5 years ago
I'm getting this test failing:
/export should export to TEI:
AssertionError: expected 'parsererror' to equal 'listBibl'
+ expected - actual
-parsererror
+listBibl
at Context.<anonymous> (test/export_test.js:145:10)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
Is this the same bug?
Ah yes, answered my own question: 7bce4a3e2cc6fd3eb50d459d59fdf7e7e524b049
A TEI document uses a dedicated XML namespace but includes an
id
attribute in the XML namespace. The JSDOM XMLSerializer we're using is exporting the id with anns1
prefix, which makes it invalid XML. The XMLNS prefix has to bexml
, and it doesn't need to be defined, so there should just be anxml:id="…"
attribute. It's possible the TEI translator could do something different here, but this works properly in Firefox, so I assume this is a bug in JSDOM XMLSerializer.Reproduce with
npm test -- -g TEI
The parser error is
may not assign the xml namespace to another prefix
.Reported here: https://groups.google.com/d/topic/zotero-dev/GGpHfZlO8FM/discussion