[xsl] Correct way to test for no match

Subject: [xsl] Correct way to test for no match
From: Dan Vint <dvint@xxxxxxxxx>
Date: Thu, 1 Oct 2009 13:04:58 -0700 (PDT)
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:

      <graphic boardno='a'/>
      <entry><ipbilus><xref shtref='b'/></ipbilus>

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


Danny Vint

Specializing in Panoramic Images of California and the West

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

Current Thread