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

Re: logical AND does not work in xsl:for-each element

Subject: Re: logical AND does not work in xsl:for-each element combination
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Sun, 25 Sep 2005 12:18:08 +0530
xsl logical and
I guess you require this

<xsl:for-each select="/GEDCOM/EventRec/Participant[Link/@Ref='X1' and
Role = 'Y1']">
     <xsl:value-of select="../Date"/>
</xsl:for-each>

Regards,
Mukul

On 9/25/05, Peter Teichert <peter.teichert@xxxxxx> wrote:
>
> Hi xslt folks,
>
> I know that the logical AND was surely discussed but it could not help me to
solve the problem.
>
> Shortly I have teh following xml structure
>
> <GEDCOM>
>  <EventRec>
>    <Participant>
>      <Link Ref="X1"/>
>      <Role>Y1</Role>
>    </Participant>
>    <Participant>
>      <Link Ref="X2"/>
>      <Role>Y2</Role>
>    </Participant>
>    <Participant>
>      <Link Ref="X3"/>
>      <Role>Y3</Role>
>    </Participant>
>    <Date>Date1</Date>
>    <Place>Place1</Place>
>    <Information>Info1</Information>
>  </EventRec>
>
> I want to locate a specific participant and extract the nodes Date, Place
and Info with the following xsl:for-each
>
> <xsl:for-each select="/GEDCOM/EventRec/Participant[@Ref='X1' and
Role['Y1']]">
> <xsl:value-of select="../Date"/>
> </xsl:for-each>
>
> The output for both cases separated is correct but when combined it displays
always 3 dates and not only one date
>
> What I am doing wrong here ?
> --
> PTE

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.