I am transforming a XML document to HTML. A fragment of that XML is below.
<GSP VER="3.2">
<TM>0.006141</TM>
<Q>Search site:http://www.example.com</Q>
<PARAM name="access" value="p" original_value="p"/>
<PARAM name="as_dt" value="i" original_value="i"/>
<PARAM name="as_epq" value="" original_value=""/>
<PARAM name="as_eq" value="" original_value=""/>
<PARAM name="as_lq" value="" original_value=""/>
<PARAM name="as_occt" value="any" original_value="any"/>
<PARAM name="as_oq" value="" original_value=""/>
...
In my XSL I want to output the content of Q in a string, I know how to do that:
<a href="./?q={Q}...
But I don’t know how to output the contents of the PARAM node named “as_occt”, “original_value” value using the curly brace method. Help!
I already output the value using this method, but it won’t work in the curly brace string system above:
<xsl:template match="PARAM[@name='as_occt']">
<xsl:value-of select="@original_value"/>
</xsl:template>