RE: [xsl] Difference between "/" and "//"

Subject: RE: [xsl] Difference between "/" and "//"
From: "Earl Spencer" <eapencer74@xxxxxxxxxxx>
Date: Thu, 21 Jun 2001 17:02:03 -0000
Hi Micheal,
This is my xsl
<xsl:template match="MC">
<xsl:if test="contains($searchList, concat(normalize-space(SC/@BCID), ','))">
<MC id="{@id}">
<xsl:apply-templates/>
</MC>
</xsl:if>
</xsl:template>



and my xml goes like this <ROOT> <MC id="1"> <SC BCID="12"> <SC BCID="13"> <SC BCID="14"> <MC> <MC id="2"> <SC BCID="15"> <SC BCID="16"> <SC BCID="17"> <MC> <MC id="3"> <SC BCID="21"> <SC BCID="22"> <SC BCID="23"> <MC> <ROOT>

if i give a search string of 12,16,21,
i have to get

<ROOT>
<MC id="1">
<SC BCID="12">
<MC>
<MC id="2">
<SC BCID="16">
<MC>
<MC id="3">
<SC BCID="21">
<MC>
<ROOT>
which i get
if my search string is 12,i get the desired result
if my search stirng is 13, i get a blank xml with only the <ROOT>

it means my search string is searching for only the first SC but when it is given as multiple elements i get the right answer.

Any suggestion
Thanks
Spencer




From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [xsl] Difference between "/" and "//"
Date: Thu, 21 Jun 2001 17:46:32 +0100

No, I can't give you a clue. It would help if you wrote the question in
grammatical sentences, and it would help even more if you showed us what
your source XML and stylesheet look like.

Mike Kay
Software AG

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
> Earl Spencer
> Sent: 21 June 2001 17:24
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Difference between "/" and "//"
>
>
> Hi ppl,
>            What is the actual difference between "/" and "//"
> cause i have a
> petty problem when use a stylesheet to search the xml then i
> get the correct
> result only if there is more than one string or else i get a
> wrong result if
> there is only one search element i pass the search elements this way
>
> "23,34,56,78," when this search string is sent i get the
> correct result
>
> "34," but this string results in a null can anybody give me a
> clue what went
> wrong.
>
> Thanks in advance
> Spencer
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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



_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com


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



Current Thread