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

RE: test context node existence

Subject: RE: test context node existence
From: "Houghton,Andrew" <houghtoa@xxxxxxxx>
Date: Fri, 27 Jun 2008 17:31:12 -0400
RE:  test context node existence
> From: max toro q [mailto:maxtoroq@xxxxxxxxx]
> Sent: Friday, June 27, 2008 5:26 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  test context node existence
>
> Hello list,
> I have a stylesheet that sometimes run using an initial context node
> and other times using an initial named template.
> What I need is a way to test if a context node exists, or else I get a
> dynamic error when a call apply-templates, or when I do any kind of
> node test.

Why can't you say:

<xsl:if test="exists(foo:node)">
  <xsl:apply-templates select="foo:node" />
</xsl:if>


Andy.

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.