I just rewrote the BioMedCentral (et al.) translator to work mainly
with the embedded RDF in the header, with some extra logic to handle
search results and metadata oddities:
https://github.com/ajlyon/translators/blob/dd3c956584d87cda226941f7a956a57af0d1f748/BioMed%20Central%20and%20More.js
I did this by loading the Embedded RDF translator with loadTranslator
and calling getTranslatorObject() on it, then just running the doWeb
of Embedded RDF.js. It works, but I don't know if what I did was
actually kosher-- can I do that?
I could have replicated the Embedded RDF logic in the BMC translator,
but this was a cleaner solution-- one of the shortest translators I've
written. But it felt so much like cheating that I feel like there must
be something wrong.
If this is OK, then I'm going to go ahead and take this approach to a
good many translators that have decent metadata, but still need some
tweaking to get a quality Zotero experience (particularly for search
results and fulltext).
Avram
I did try loadTranslator("web"), which failed. I didn't try
setDocument, which is obviously a cleaner approach than requesting the
translator object, and I'll see about that shortly.
- Avram
setDocument doesn't work either-- it looks like the web translator
functions aren't exposed to the sandbox as much as we might like.
Avram