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

Correct way to test for no match

Subject: Correct way to test for no match
From: Dan Vint <dvint@xxxxxxxxx>
Date: Thu, 1 Oct 2009 13:04:58 -0700 (PDT)
 Correct way to test for no match
I have a structure where I need to match values between w element attributes. These elements are in different parst of the document. Problem I'm trying to solve is when there is a typo in one of the attributes and there is no match. I thought this would do it, but it's not
<xsl:when test="ancestor::ipb/figure/subfig/graphic[@boardno=$sht_num]/@boardno">


same with this

<xsl:when test="ancestor::ipb/figure/subfig/graphic[@boardno=$sht_num]/@boardno = ''">

Any suggestions?

Here is the doc structure:

<ipb>
  <figure>
    <subfig>
      <graphic boardno='a'/>
    </subfig>
  </figure>
  <table>
    <row>
      <entry><ipbilus><xref shtref='b'/></ipbilus>
      </entry>
    </row>
  </table>
</ipb>

$sht_num is set to xref/@shtref so b never finds a on graphic

..dan

---------------------------------------------------------------------------
Danny Vint

Specializing in Panoramic Images of California and the West
http://www.dvint.com


Voice:510:522-4703 FAX: 801-749-3229

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-2011 All Rights Reserved.