xsl-list
[Top] [All Lists]

Antw: Re: occurrences and axis

2003-11-18 05:18:10
Hi Elena,

Try this. It's based on your example. 

XML:
<teiCorpus.2>   
  <div4 type="forma">           
    <termEntry id="without">                    
      <tig>                             
        <ptr gradRef="it_co" type="tipo lessicale" target="CAZZO"/>     <ptr 
type="area tematica" target="alt" />                       <ptr gradRef="it_co" 
type="voce" target="stupido"/>
      </tig>            
    </termEntry>
   <!-- copied your example -->         
    <termEntry id="with gerg-in">                               
       <tig>                            
        <!-- Changed it here-->                         
        <ptr gradRef='gerg_inn' type="tipo lessicale" target="CAZZO"/>          
                
        <ptr type="area tematica" target="alt" />                       <ptr 
gradRef="it_co" type="voce" target="stupido"/>
      </tig>            
    </termEntry>        
   </div4>
</teiCorpus.2>

XSLT:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
   <xsl:template match="/">
       <xsl:apply-templates select="//termEntry"/>
   </xsl:template>
   
   <xsl:template match="termEntry">
       <xsl:if test=".//ptr[(_at_)gradRef='gerg_inn']">
       <xsl:copy-of select="."/>
       </xsl:if>
   </xsl:template>
</xsl:stylesheet>

Cheers,
Agnes




Van: Elena Pierazzo <pierazzo(_at_)ital(_dot_)unipi(_dot_)it>
Aan: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Datum: di 18 nov 03, 12:29
Onderwerp: Re: [xsl] occurrences and axis

 <xsl:if test="child::ptr[attribute::gradRef='gerg_inn']">

or e.g.

 <xsl:if test="ptr/@gradRef = 'gerg_inn'">

 

but it did not work :-(
Elena



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>
  • Antw: Re: occurrences and axis, agnes . kielen <=