xsl-list
[Top] [All Lists]

RE: xPath question

2004-07-08 06:06:01
Jan ,

You need to use a <xsl:for-each> and traverse through each one of the items.
'$HygHeadDT/Header/item' selects only the first item. Thats why you are
having this issue.

Thanks,
Vidya



-----Original Message-----
From: Jan Kohnert [mailto:J(_dot_)Kohnert(_at_)swisslab(_dot_)de]
Sent: Thursday, July 08, 2004 9:04 AM
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] xPath question


Hello List,

I have a variable:
<xsl:variable name="HygHeadDT">
  <Header>
    <item>BMAT</item>
    <item>HBUE</item>
    <item>NURR</item>                                         
    <item>TAB1</item>
    <item>TAB2</item>
    <item>TAB3</item>
    <item>HPRO</item>
    <item>HZUS</item>
    <item>HANL</item>
    <item>BEST</item>
    <item>HDES</item>
    <item>HBAD</item>      
  </Header>
</xsl:variable>

At some point of XML processing, I want to check, if the element "id" a
different value as one of the strings of any $HygHeadDT/Header/item

<xsl:apply-templates select="//CHAPTER[id != $HygHeadDT/Header/item]"
mode="MibeHyg"/>

But this query only seems only to work, if "id" = "BMAT".

What are I m doing wrong?

thanks !!!

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--


<Prev in Thread] Current Thread [Next in Thread>