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: [opendocument-users] Re: Automated link checking


An XSLT 2.0 solution:
expath is a developing set of extensions of xpath.

Using xslt, iterate over the links in the document
(expath can help with that, by unzipping the ODF file)

Then something like

<xsl:import href="http://expath.org/ns/http-client.xsl"/>

    ...
    <xsl:variable name="req" as="element(http:request)">
       <http:request method="get" href="{ $my-url }"/>
    </xsl:variable>
    <xsl:variable name="resp" select="http:send-request($req)"/>
    <xsl:sequence select="
        if ( $resp[1]/xs:integer(@status) eq 200 ) then
          'Ok'
        else
          error(...)"/>


HTH

-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk


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