Search

Sorry to be a pain folks. I am struggling in using xsl withing other code.

How come this works(position()):

 <div class="{***position()***}" ><img  src="{$workspace}/images/{bio-image/filename}"/></div>

but inside Javascript it does not work:

&lt;script>
$( "{position()}" ).click(function() {
$( "{position()}" ).toggle( "slide", "easeInOutExpo", 100);
});
&lt;/script>

However this:

<xsl:value-of select='position()' />

Works...

I don't get it.

like this:

  1. {data} = xsl inside markup attributes
  2. <xsl:...="data"/> = xsl outside markup attributes

that easy... ha! Thanks!!!!!!

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