G
G
Gena2014-05-12 12:23:42
Computer networks
Gena, 2014-05-12 12:23:42

Why doesn't XSL read cookies?

Hello. Actually, the problem is that when reading a cookie, the parameter is always empty. The cookie was recorded using the jquery.cookies plugin.
This is how I write:

$('#popup_city').children('a.button_popup').click(function() {
  var elem = $('#popup_city').children('select').children('option:selected');
  $('span[rel=#popup_city]').attr('id', elem.attr('value'));
  $('span[rel=#popup_city]').text(elem.text());
  $.cookie('city', elem.attr('value'), {path: '/'});
  return false;
  });

This is how I read it:
<xsl:param name="city"/>
<xsl:template match="result[@module = 'catalog'][@method = 'category']">
        <xsl:value-of select="$city"/>
</xsl:template>

Tell me, please, what is the problem. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
i, 2014-12-28
@ilyarsoftware

The ability to retrieve the cookie value during XSLT transformation depends on which XSLT processor is used in the production environment. You can also observe how this issue is addressed differently in products or libraries.
In particular, UM.CMS (tested on version 2.9.7-49344) passes the cookie value to the parameter of the same name when transforming the template.
The trouble may be related to an older version where this behavior is not supported, or some external bug.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question