[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: document () return values.

Subject: Re: document () return values.
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Mon, 9 Aug 2010 18:29:55 +0100
Re:  document () return values.
On Mon, 9 Aug 2010 13:46:41 +0000 (GMT)
Florent Georges <lists@xxxxxxxxxxxx> wrote:

> Dave Pawson wrote:
> 
> > Would it be useful to you to be able to access the http
> > returned status codes from the 'get'?
> 
>   I am not sure to understand the complete requirements, but that's
> possible with the EXPath HTTP Client
> <http://expath.org/modules/http-client>.  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(...)"/>
> 
>   Regards,

Exactly what I wanted... or should I say,
what is perfect for a link checker!

Thanks Florent.

regards 



-- 

regards 

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.