viv:set
associates a node set with a string
Synopsis
viv:set (str, ns); string str; node-set ns;
Description
Associate a node-set with a string. The node-set can be later retrieved using viv:get.
Arguments
- str: the "key" string.
- node-set: the node-set to store.
Example
Input Example:
<parse> <ok>a<ok2/>b<ok3/>c</ok> <parser type="xsl"> <xsl:template match="/"> GET/SET: <xsl:value-of select="count(viv:get('test')//*)"/> <xsl:value-of select="viv:set('test', /*)" /> GET/SET: <xsl:value-of select="count(viv:get('test')//*)"/> </xsl:template> </parser> </parse>
Output Example:
GET/SET: 0 GET/SET: 2