Search

Hi all,

Im trying to target a select using values from 2 params and a static path. This is what I've tried so far:

select=/data/{$param1}-{$param2}-menu/entry

here is one example of a desired output

<xsl:for-each select="/data/fa-about-menu/entry">

where "fa" was the value from $param1 and "about" is the value of $param2 and 'menu' is static

Can anyone recommend an easy way of doing this? Is it simply a syntax problem or is this not possible? I've also tried concatenating the two params into a variable but this fails also.

Thanks!

Try this instead:

/data/*[name() = concat($param1, '-', $param2, '-menu')]/entry

This trips everyone up ;)

Hi rowanjl.

I fu#$ing love you.

also a girl loves you more.

wow rowanjl. i learn something new every day. nice.

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