Search

Hey all,

Is there a way I can create a: "if path value of 'name' is equal to the value of another value then get data"?

Below is a random example of what I'd like:

    <xsl:choose>
<xsl:when test="{/data/member/first-name} = {/data/public/first-name}">
    Email: <xsl:value-of select="/data/member/email-address"/>
</xsl:when>
<xsl:otherwise>

Thanks!

Show us XML plz

<xsl:when test="/data/member/first-name = /data/public/first-name">

curly braces are only used when outputting values into html attributes.

Thanks but this issue with that is it only returns the first member of the data source, I want it to say if that equals that then show the email address of that statement.

Then you need <xsl:for-each select="..."> to iterate over the datasource. As @alpacaaa has asked, please provide your XML so we can tailor the result to your needs.

Also, your question didn't explain that clearly enough. Please be polite, proactive, and clear

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details