Announcement Announcement Module
No announcement yet.
XSLT: Access Request Params Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • XSLT: Access Request Params

    Is it possible to access request parameters in XSLT views without explicitly adding them to the XML Source? I'm pretty sure that global parameters can be defined for XSLT transformations, so it'd be nice to be able to access request attributes so if there's a querystring param such as "...?page=1", I can access it in my XSLT with <xsl:value-of select="$page" /> or <xsl:value-of select="$" />

  • #2
    This might be a valuable addition but it's probably not the lightest process. You can have a look at Cocoon's XSLTTransformer (method getLogicSheetParameters() which is used in setConsumer()) how we did it there (optionally especially since it also affects caching).



    • #3
      I'm trying to give my application's consumers the option of using XSLT or JSP for the view. I suppose I can simply add a few nodes to the XML Source in my XSLT View representing the querystring/form params. I just didn't want to duplicate functionality that may already exist. XSLT gets a lot of flack for being slower than other other view technologies, but I can't imagine that, if possible, adding request params to the view params would add that much more overhead, other than when you introduce caching, as you mentioned.


      • #4
        I added a JIRA feature request, even though it's not critical: