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

Re: Avoiding boneheaded mistakes in XSLT?

Subject: Re: Avoiding boneheaded mistakes in XSLT?
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Thu, 30 Dec 2010 09:05:02 +0000
Re:  Avoiding boneheaded mistakes in XSLT?
On Wed, 29 Dec 2010 23:49:53 -0500
Graydon <graydon@xxxxxxxxx> wrote:

> > Even without schema awareness/context, surely the processor can
> > tell when an xpath expression will result in zero match?
> 
> But a zero match is completely legitimate, isn't it?
> 
> If I'm matching on para/b, and much of my input doesn't have it, and
> some of it does, I shouldn't get a warning because I'm looking for
> something that isn't in this particular input file.
> 
> Or am I completely mis-understanding what you want, there?


Agreed, there are cases where this might be wanted as a response
from an xpath expression. Hence a warning. Hence 'not all the time'.

But consider the typo that we all make from time to time .... to time.
If it can help find that, it helps debugging.

Once you've stared at a stylesheet for minutes on end and read what
you thought you wrote, rather than what you actually wrote....
Then any debug info helps!


-- 

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.