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

Re: Templates not applied to output of document HTTP c

Subject: Re: Templates not applied to output of document HTTP call
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx>
Date: Thu, 13 Sep 2012 14:49:53 +0100
Re:  Templates not applied to output of document HTTP c
OK that was funny.

On Thu, Sep 13, 2012 at 2:47 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>> The code below ignores it's input and is supposed to apply templates
>> to the output of the HTTP call in the doc function, however it hangs.
>
>>     <xsl:template match="/">
>>        <xsl:apply-templates select="doc('http://blah')"/>
>>     </xsl:template>
>
> This is a classic gotcha - your root matching template will endlessly
> 'loop' as you apply-templates to document node returned by the doc()
> function.
>
> The solution is to do select="doc('http://blah')/*" or use modes if
> you need to handle the document node.
>
>
>
> --
> Andrew Welch
> http://andrewjwelch.com

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.