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

Re: (Possible) pitfall: XSLT 2, 9.4 Creating implicit

Subject: Re: (Possible) pitfall: XSLT 2, 9.4 Creating implicit document nodes
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 09 May 2012 16:47:12 +0100
Re:  (Possible) pitfall: XSLT 2
On 09/05/2012 16:02, Christian Roth wrote:

this is a heads-up for a pitfall (that at least I have fallen into several times now...)

Is there a technique or pattern I could employ (maybe utilizing the @as attribute somehow?)

Firstly, avoid creating temporary trees where you don't need them. Whenever you find yourself using xsl:variable with content, ask yourself whether you shouldn't be using the @select attribute instead.

Secondly, always use the @as attribute to declare the type of the variable you think you are creating. When you declare your types, the compiler can tell you about your mistakes.

Michael Kay

Current Thread


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.
First Name
Last Name
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.