Andreas Hartmann wrote:
Michael Wechner wrote:
Doug Chestnut wrote:
Hi Devs,
For my publications I have set up a external link check usecase which
checks the external links of a document and caches the linkreport.
The linkreport gets recreated when the document has been modified.
The external links are checked using a HEAD request.
I call this linkreport usecase from some javascript in the authoring
pages. The javascript uses XMLHttpRequest to call the linkreport
usecase onload, parses the xml report for broken links, then assigns
class="brokenlink" to all links which contain the broken href in the
current document (this highlights the link using a css property).
The cached link reports could possibly be used to create a
publication broken link report.
Is there any interest in this being added to the default pub in 1.4?
yes, I think this would be very nice.
+1, that would be great
I will it clean up and commit it ;)
What about performance and if
there is not network connection available?
Doesn't seem to be a problem. Plus the report usecase is being called
via the javascript on the rendered document, so there is no delay in
displaying the document, just the broken links in the doc (the broken
links become highlighted a second or two after the page has been
rendered in the browser).
I made a simple last-modified selector to compare the docs mod date to
the linkcheck cache mod date, so it only really runs (delay in
reporting) when the page has been modified. I guess there should also
be a step=refresh parameter for the usecase as well.
I copied and modified LinkStatusGenerator (added depth, HEAD request for
max depth, and source handling for internal links) and LinkSerializer,
and made a LastModSourceSelector to get this working via a sitemap
pipeline (usecase-linkreport.xmap). Should this all be wrapped up into
a usecase using the new framework?
Would it be possible to build-in a switch for turning on/off this
feature?
That would be good, maybe using a menu item?
Then we need "checkable" menu items, but that would be nice for
the "show sidebar" functionality as well.
Good idea, should the switch be global or per document? If global, I
guess the switch could just be a file in the cache? If per document, I
guess the switch would be in the documents meta file, with a method
added to the api?
--Doug
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]