This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Difference between "/" and "//"
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] Difference between "/" and "//"
- From: "Earl Spencer" <eapencer74 at hotmail dot com>
- Date: Thu, 21 Jun 2001 17:02:03 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@iclway.co.uk>
>Reply-To: xsl-list@lists.mulberrytech.com
>To: <xsl-list@lists.mulberrytech.com>
>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@lists.mulberrytech.com
> > [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of
> > Earl Spencer
> > Sent: 21 June 2001 17:24
> > To: XSL-List@lists.mulberrytech.com
> > 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