How to call params from whithin braces?
This is an open discussion with 5 replies, filed under XSLT.
Search
Stumbled across this problem again:
<input name="fields[articel]" value="{galleries/entry/@id}" type="hidden" />
works, but not
<input name="fields[artikel]" value="{$section/entry/@id}" type="hidden" />
Althought I get no errors this time, just no results.
Try:
<input name="fields[artikel]" value="{[name() = $section]/entry/@id}" type="hidden" />
No success. Error Message is:
XSLTProcessor::importStylesheet(): Invalid expression XSLTProcessor::importStylesheet(): Attribute 'value': Failed to compile the expression '[name() = $section]/entry/@id' in the AVT. XSLTProcessor::transformToXml(): No stylesheet associated to this object
Oops, try this:
<input name="fields[artikel]" value="{//self::node()[name() = $section]/entry/@id}" type="hidden" />
Works!
Thanks a lot!
Create an account or sign in to comment.
I'd like to have comments on multiple pages. For this purpose, I want to have one get-comments.xsl which is utilized by all the different pages.
I call get-comments from the pages like this:
get-comments:
But the "filter"-part is not working. I get an XSLT Processing Error. I also tried
bearbeiten
, but this won't work either. How is the correct syntax to call a variable from within the filter?
booker