Re: String Match

Subject: Re: String Match
From: anupama@xxxxxxxxxxxxxxx
Date: Tue, 21 Dec 1999 16:39:15 -0800

I replaced
<xsl:template match="//li">
<xsl:copy>
<xsl:apply-templates mode="copy" select="div3[ol/li='ILe']" />
</xsl:copy>
</xsl:template>

with
<xsl:template match="//div3/li">
     <xsl:if test="contains(. , 'ILe')">
          <xsl:copy-of select='.'/>
     </xsl:if>
</xsl:template>

I get
<li class="T">
agni;m ILe puro;hitaM yajJa;sya deva;m Rtvi;jam /
</li>
<li>ILe</li>

as output using LotusXsl



-Ana






John Robert Gardner <jrgardn@xxxxxxxxx>@mulberrytech.com on 12/21/99
03:44:16 PM

Please respond to xsl-list@xxxxxxxxxxxxxxxx

Sent by:  owner-xsl-list@xxxxxxxxxxxxxxxx


To:   xsl-list@xxxxxxxxxxxxxxxx
cc:

Subject:  String Match

Also, there is the simple matter of trying to find a word in a basic
heirarchy:

<?xml version="1.0"?>
<html>
<body bgcolor="#ffffff">
<div class="Rgveda">
<div1 class="maNDala" id="1">
<div2 class="hymn" id="1.1">
<div3 class="verse" id="1.1.1">
<ol class="mantra" type="a">
     <li class="T">
agni;m ILe puro;hitaM yajJa;sya deva;m Rtvi;jam /
</li>
<li>ILe</li>
<li class="T">
ho;tAraM ratnadhA;tamam //
</li>
</ol>
</div3>
</div2>
</div1>
</div>
</body>
</html>



THis does not work, nor does any multitude of versions of contains &c.
(the word I'm tyring to find is ILe-- and it was even made a total
freebie by fake-creating a node with only ILe as content-- in reality, I
need ot get all div3's that have an <li> which contain ILe _somewhere_
within them):

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0"
                >

<xsl:output type="xml" indent="yes"/>

<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>

<xsl:template match="//li">
<xsl:copy>
<xsl:apply-templates mode="copy" select="div3[ol/li='ILe']" />
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

=-=-=-=-=-=-=-=-=-==-=-=-=
John Robert Gardner
ATLA-CERTR
Emory University
------------------------------------------------------------
http://vedavid.org/diss/
"If there is something you're thinking of doing, or wish you could do,
begin it.  In boldness there is mystery and power . . . . "  -Goethe



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




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


Current Thread