template failed 15,xsl match all rule,xsl catch all, xml%%%template failed 15 - RE: Catch ALL

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

RE: Catch ALL | Failed template rule

Subject: RE: Catch ALL | Failed template rule
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 21 Mar 2005 15:19:53 -0000
template failed 15
match="*" matches all elements, match="node()" matches all nodes. These have
lower priority than match="xx" where xx is a specific element name: they
won't match if there is another higher-priority rule.

Michael Kay
http://www.saxonica.com/



> -----Original Message-----
> From: Karl Stubsjoen [mailto:kstubs@xxxxxxxxx] 
> Sent: 21 March 2005 15:03
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Catch ALL | Failed template rule
> 
> I'd like a catch ALL template rule, actually a catch NOT template
> rule.  In an effort to check for the existence of a select, I have
> setup a match template rule that simply returns "1" for a match.  So I
> have:
> 
> <xsl:template match="record" mode="recordexists">
> <xsl:text>1</xsl:text>
> </xsl:template>
> 
> The failed select would need to return a "0".  So I need a match that
> simply returns 0.
> 
> So something like:
> 
> <xsl:template match="not(record)" mode="recordexists">
> <xsl:text>0</xsl:text>
> </xsl:template>
> 
> (which is not a legal match statement, but that is what I need).  I'm
> sure there is a way, and I'm sure it is obvious!  Just not coming to
> me.
> 
> Thanks,
> Karl

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.