Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upTEI.js > Generate IDs: xml invalid for @xml:id and <imprint/> #1704
Comments
oriflamms
changed the title from
translators > TEI.js > Generate IDs: xml invalid for @xml:id and <imprint/>
to
TEI.js > Generate IDs: xml invalid for @xml:id and <imprint/>
Aug 3, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sorry, what tool exactly is throwing those errors? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Thank you for your answer. My xml editor is Oxygen |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adam3smith
Aug 4, 2018
Collaborator
that all sounds right. If you'd be willing ot turn this into a pull request, that'd be very helfpul. It'd probably take some time for me to get around to doing this myself.
that all sounds right. If you'd be willing ot turn this into a pull request, that'd be very helfpul. It'd probably take some time for me to get around to doing this myself. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
oriflamms
Aug 4, 2018
Contributor
Thanks for your incentive. Done.
However, I could not fix the fact that authors in single mode are not exported. I've tried with
if (item.creators[i].fieldMode == true) { // fieldMode true, assume corporate author surname = teiDoc.createElementNS(ns.tei, "name"); surname.appendChild(teiDoc.createTextNode(item.creators[i].firstName)); curCreator.appendChild(surname); }
and also lastName, but this is not working and I haven't found a solution. Do you want me to open another issue? If you give me a hint, I'll test it and do another pull request.
Thanks for your incentive. Done. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adam3smith
Aug 4, 2018
Collaborator
Thanks for working on this. I didn't actually know this myself, but items with fieldMode == true
are returned by Zotero as { "name": "Singlefield" "creatorType": "author" }
(I found this out by putting Z.debug(item.creators[i])
into the loop for the authors), i.e. if (item.creators[i].name)
should work.
Thanks for working on this. I didn't actually know this myself, but items with |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adam3smith
Aug 4, 2018
Collaborator
and feel free to wrap this into the same pull request if you don't mind.
and feel free to wrap this into the same pull request if you don't mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Great! Thank you for your help. Works perfectly. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Closed a while back in #1705 |
oriflamms commentedAug 3, 2018
In exporting a library into TEI format, I get three different errors:
value of attribute "xml:id" is invalid; must be an XML name without colons
corresponding to the presence of apostrophes (either " ' " or " ’ ") in author names such as "Gerard O’Daly"
I would suggest to deal specifically with those two signs into lines 122, 123 (xmlid = xmlid.replace)
element "imprint" incomplete; expected element "biblScope", "catRef", "classCode", "date", "distributor", "pubPlace", "publisher" or "time
corresponding to the exported
<imprint><!-- no publisher, publication date or place given --></imprint>
Obviously an incentive to search for the information, but not always feasible.
I would suggest to export empty elements
<pubPlace/><publisher/><date/>
element "note" not allowed yet; expected element "biblScope", "catRef", "classCode", "date", "distributor", "pubPlace", "publisher" or "time"
in monographs that have no place nor date, but a URL
The suggested solution for point 2 solves also this one.