aldaris / docbook-linktester

Tests external links and olinks in DocBook documentation for validity
3 stars 1 forks source link

Differentiate malformed olinks from other problems #17

Open markcraig opened 8 years ago

markcraig commented 8 years ago

David Goldsmith saw some errors in the docbook-linktester output that appeared to be regular URLs. But in fact they were malformed olinks.

this causes a linktester error: <link xlink:href="http://www.splunk.com" xlink:show="new" xlink:role="http://docbook.org/xlink/role/olink"

Splunk

Changed to this and it got rid of the link tester error

<link xlink:href="http://www.splunk.com" xlink:show="new"

Splunk:

Any Olink href starting with a scheme is probably a copy/paste error on the part of the writer. It would be nice if these could be flagged with a message indicating the problem.

I'd be happy with something like (link has xlink:role set to olink but is not an olink). What do you think, @dgoldssfo ?

dgoldssfo commented 8 years ago

Well, it's easy enough to work around. I don't know if I'd necessarily change the way the code is working (since as you say the olinks are malformed), but it would be nice to get a better diagnostic from linktester when rejecting these URLs.