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

occurrences and axis

Subject: occurrences and axis
From: Elena Pierazzo <pierazzo@xxxxxxxxxxxxx>
Date: Tue, 18 Nov 2003 11:57:48 +0100
xsl axis
I have a problem in creating a list of occurrences.
Here a sample of my file:

     <div4 type="forma">
      <termEntry id="LCLiNPLi4S9Alt">
    <term grammRef="vat3ips2" type="forma">&apos;un capisci un cazzo</term>
    <ptr type="parlante" target="Li4" />
    <ptr type="domanda" target="S9Alt" />
    <ptr gradRef="dial" type="tipo lessicale" target="NON"/>
    <ptr gradRef="it_co" type="tipo lessicale" target="CAPIRE"/>
      <ptr gradRef="it_co" type="tipo lessicale" target="CAZZO"/>
    <ptr type="area tematica" target="alt" />
         <ptr gradRef="it_co" type="voce" target="stupido"/>

I would like to get all the occurrences (here encoded by the <term> element) included in <tig>, that have a <ptr gradRef="gerg_inn">; is it possible?
I think it is the case to match the <tig> element and then to ask for the <term> child element in case the <tig> has a <ptr gradRef='gerg_inn'> child.
I've tried in this way:

<xsl:template match="/">

<xsl:key name="term" match="term[@type='forma']" use="."/>

<xsl:template match="//tig" name="pippo">
<xsl:if test="child::ptr[gradRef='gerg_inn']">
<xsl:for-each select="child::term[@type='forma'][not(.=preceding::term)]">
<xsl:sort select="."/><br />
<xsl:value-of select="concat(.,' ',count(key('term',.)))"/>


but it is not working... can anyone help me?
Many thanks Elena

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

Current Thread


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.
First Name
Last Name
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-2013 All Rights Reserved.