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

Re: My XPath mistakenly referenced an element that do

Subject: Re: My XPath mistakenly referenced an element that doesn't exist and I got no error message ... is this bad language design?
From: "BR Chrisman brchrisman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Oct 2021 19:48:51 -0000
Re:  My XPath mistakenly referenced an element that  do
Yes, that's why the question doesn't make sense 'in general'... but if
there's some context by which this hypothetical colleague wants a warning
any time select generates a null sequence, 'doing it twice' is feasible
with a straightforward preprocessor.  I've mainly used this method for
debugging, personally.

On Thu, Oct 14, 2021 at 9:55 AM dvint dvint@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> That only tells you this particular instance doesn't include that element
> or content. It doesn't tell you if the path might actually exist in some
> other context
>
>
>
> Sent from my Verizon, Samsung Galaxy smartphone
>
>
> -------- Original message --------
> From: "BR Chrisman brchrisman@xxxxxxxxx" <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
> Date: 10/14/21 9:48 AM (GMT-08:00)
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  My XPath mistakenly referenced an element that doesn't
> exist and I got no error message ... is this bad language design?
>
> It's not very difficult to apply a transform to the stylesheet grabbing
> the @select from value-of or apply-templates or what not into new xsl:if
> test="count(@select) = 0"... xsl:message ... if warnings is what your
> colleague wants.
>
> - Brian
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/1240222> (by
> email)
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/965995> (by
> email <>)

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.