JATS-0046-007

Rule Overview

Message

ext-link that contains a DOI should have consistent DOI between the text "$ext-link-doi-text" and the @xlink:href attribute "$ext-link-doi-href"

Rule XPath:

This rule ASSERTS the following, raising an alert if FALSE:

let $ext-link-doi-href := replace(@xlink:href, '.*(doi:?\s*|https?://(dx\.|www\.)?doi\.org/)?(10(\.\d+)+/\S+).*', '$3', 'i') returnlet $ext-link-doi-text := replace(head(.//text()), '.*(doi:?\s*|https?://(dx\.|www\.)?doi\.org/)?(10(\.\d+)+/\S+).*', '$3', 'i') returnnot(matches(string(), '(https?://(dx\.|www\.)?doi\.org|(https?://(dx\.|www\.)?doi\.org/|(doi)?:?\s*)?(10(\.[0-9]+)+/[^\s\?#]+)([#\?][^\s]+)?)', 'i')) or not(@xlink:href) or $ext-link-doi-text eq $ext-link-doi-href

Contexts

Inherited Contexts

Related rules