openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
168 stars 63 forks source link

[XSLT] doubling of URLs included in references #2259

Closed mauromsl closed 3 years ago

mauromsl commented 3 years ago

Describe the bug When a JATS XML document includes a URL within a mixed-citation reference, instead of replacing the URL with an anchor tag, the hyperlink is appended at the end, leading the the URL being doubled.

Janeway version v1.3.10

Screenshots If applicable, add screenshots to help explain your problem. image

joemull commented 3 years ago

Hi @mauromsl I don't know if this is related but I'm now seeing the opposite issue, where URLs aren't showing up at all: https://journals.publishing.umich.edu/gs/plugins/typesetting/preview_galley/article/830/galley/50/

Screen Shot 2021-07-09 at 4 29 07 PM
ajrbyers commented 3 years ago

I suspect this hasn’t been deployed yet so not the same issue. Can you post the tagging?

joemull commented 3 years ago

<fn id="fn14">
  <label>14.</label>
  <p>Lisa Lim, &#x201C;Doxxing: The Powerful &#x2018;Weapon&#x2019; in the Hong Kong Protests Had a Petty Beginning,&#x201D;
    <italic>South China Morning Post,</italic>
    November 11, 2019,
    <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="url" xlink:href="https://www.scmp.com/magazines/post-magazine/short-reads/article/3036663/doxxing-powerful-weapon-hong-kong-protests-had">https://www.scmp.com/magazines/post-magazine/short-reads/article/3036663/doxxing-powerful-weapon-hong-kong-protests-had</ext-link>; Sum Lok-kei, &#x201C;Hong Kong Protests: With Nearly 5,000 Doxxing Complaints Since Unrest Erupted, Officials Mull New Powers for Privacy Commissioner,&#x201D;
    <italic>South China Morning Post</italic>, January 20, 2020,
    <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="url" xlink:href="https://www.scmp.com/news/hong-kong/politics/article/3045239/hong-kong-protests-nearly-5000-doxxing-complaints-unrest">https://www.scmp.com/news/hong-kong/politics/article/3045239/hong-kong-protests-nearly-5000-doxxing-complaints-unrest</ext-link>.</p>
</fn>
<fn id="fn15">
  <label>15.</label>
  <p>Lisa Lim, &#x201C;Do You Speak Kongish? Hong Kong Protestors Harness Unique Language Code to Empower and Communicate,&#x201D;
    <italic>South China Morning Post</italic>, August 30, 2020,
    <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="url" xlink:href="https://www.scmp.com/magazines/post-magazine/short-reads/article/3024863/do-you-speak-kongish-hong-kong-protesters">https://www.scmp.com/magazines/post-magazine/short-reads/article/3024863/do-you-speak-kongish-hong-kong-protesters</ext-link>.</p>
</fn>
<fn id="fn16">
  <label>16.</label>
  <p>Julie Zhu, &#x201C;Mainlanders in Hong Kong Worry as Anti-China Sentiment Swells,&#x201D; Reuters, October 30, 2019,
    <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="url" xlink:href="https://www.reuters.com/article/us-hongkong-protests-mainlanders-idUSKBN1X90Q8">https://www.reuters.com/article/us-hongkong-protests-mainlanders-idUSKBN1X90Q8</ext-link>.</p>
</fn>
<fn id="fn17">
  <label>17.</label>
  <p>&#x201C;Cathay Denounced for Firing Hong Kong Staff after Pressure from China,&#x201D;
    <italic>The Guardian</italic>, August 28, 2019,
    <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="url" xlink:href="https://www.theguardian.com/world/2019/aug/28/cathay-pacific-denounced-for-firing-hong-kong-staff-on-china-orders">https://www.theguardian.com/world/2019/aug/28/cathay-pacific-denounced-for-firing-hong-kong-staff-on-china-orders</ext-link>.</p>
</fn>
<fn id="fn18">
  <label>18.</label>
  <p>Frances Yoon, &#x201C;Hong Kong Draws Fewer Expats as China Curbs City&#x2019;s Freedoms,&#x201D;
    <italic>Wall Street Journal</italic>, August 6, 2020,
    <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="url" xlink:href="https://www.wsj.com/articles/hong-kong-is-losing-its-charm-for-expats-as-china-tightens-the-screws-11596706202">https://www.wsj.com/articles/hong-kong-is-losing-its-charm-for-expats-as-china-tightens-the-screws-11596706202</ext-link>.</p>
</fn>
<fn id="fn19">
  <label>19.</label>
  <p>&#x201C;New Book Announcement: &#x2018;No Third Person: Rewriting the Hong Kong Story&#x2019; by Christine Loh and Richard Cullen,&#x201D;
    <italic>Asian Review of Books</italic>, October 1, 2018,
    <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="url" xlink:href="https://asianreviewofbooks.com/content/new-book-announcement-no-third-person-rewriting-the-hong-kong-story-by-christine-loh-and-richard-cullen/">https://asianreviewofbooks.com/content/new-book-announcement-no-third-person-rewriting-the-hong-kong-story-by-christine-loh-and-richard-cullen/</ext-link>.</p>
</fn>```
joemull commented 3 years ago

@ajrbyers Can you spot anything in there that might cause problems?

mauromsl commented 3 years ago

I think this is a separate issue, since these links are part of the footnotes. This issue only addressed reference (<ref>) objects.

There is already support for ext-link objects in footnotes on our XSLT, however it doesn't recognise the ext-link-type attribute, which is set to url. While this is valid, the JATS 1.2 spec recommends using uri instead: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/ext-link.html

@joemull would it be okay to suggest the typesetter they use uri rather than url as the ext-link-type?

We might want to support url as well, if this is a common practice.

joemull commented 3 years ago

Just following up on this and wanted to record that Mauro discussed this with us and will fix the url/uri issue with this: https://github.com/BirkbeckCTP/janeway/issues/2297