Home
TeamSite
XSL String functions on query parameters
nipper
OK, I am hitting my head against the wall on the piece that should have been easy.
I have an XSL that checks for a query string, and if it contains the value of a DCR. I am trying contains as well as substring on the variable I set but they return no value. When I hardcode the data it works fine, so this is not a string, but I cannot figure out how to use the data. I have tried to wrap string(..) around it but no go. Changing the queryString variable to a text value it works. When I preview the page, the queryString variable looks great.
[php]
$CONTEXT{request.queryString}
-
Yes!
[/php]
Find more posts tagged with
Comments
nipper
OK I was able to use this to get the query parameter in a different manner, will leave the thread open if there is a better approach:
[php]
[/php]
Bowker
Your solution is just about the only way to do it. Remember $CONTEXT is processed after the transformation completes. That means the value of queryString during the transformation will be $CONTEXT{request...}
nipper
Got it. So if I did contains(string($queryString),'CONTEXT' )
it would have worked, not done what I wanted but would have worked.
Thanks