OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

opendocument-users message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Automated link checking


Your script works but "//text:a" would be a more appropriate XPath selector in order
to retrieve the hyperlink elements and not any element that contains a "xlink:href"
attribute.

As another example, I send you a script that does the job with the Perl current
implementation of lpOD. Note that the most part of the code is related to the
HTTP testing, while 2 or 3 lines of lpOD instructions extract the URLs.

This program is quite verbose: the output lists all the found in the doc content,
and provides for each one an appropriate status message:
- Non HTTP (ignored);
- Host not responding;
- Host responding but resource unavailable (404, etc...)
- Host OK and resource OK (200)

Of course, if hyperlink check was about to become a popular use case for lpOD,
we could easily specify and implement additional hyperlink-focused methods,
so explicit XPath expressions such as "//text:a" or "//[@xlink:href]" would no longer
be needed.

Jean-Marie Gouarné (lpOD Project developer)
http://www.arsaperta.com

check_links



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]