| Subject: [xsl] narrow down a selecting From: "Joeri Belis" <joeri.belis@xxxxxxxxxxxx> Date: Thu, 28 Mar 2002 14:16:55 +0100 | 
XML
<root>
 <record>
  <data>1</data>
  <namedcell name="linenr"/>
  <data>500</data>
  <namedcell name="articlenr"/>
 </record>
 <record>
  <data>2</data>
  <namedcell name="linenr"/>
  <data>80</data>
  <namedcell name="articlenr"/>
 </record>
</root>
when i try this stylesheet template match on "data" tag
<xsl:template match="data">
    <xsl:choose>
      <xsl:when test="../namedcell/@name='linenr'">
 <data>xxx</data>
      </xsl:when>
      <xsl:otherwise>
        <xsl:copy-of select="."/>
      </xsl:otherwise>
    </xsl:choose>
</xsl:template>
it will also replace articlenr ( 500 and 80 ) with xxx because 'linenr' is
found in the record xml part.
How can i only change 'linenr' and not 'articlenr' without changing the
<xsl:template match="data"> test. I don't want to write a template for every
namedcell
Joeri
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] XSL and CSS, Gertjan Assies | Thread | Re: [xsl] narrow down a selecting, Joerg Heinicke | 
| Re: [xsl] XSL question, Jeni Tennison | Date | [xsl] Matching Attribute in xsl:app, Ramesh B | 
| Month |