add-processed-xsl

In a regex parser, process some XSL code on an empty document and insert the resulting XML in the output

Description

The XSL will be evaluated at parsing time.

Attributes

Examples

Input Example:

<parser name="p">
<match token="ok">
<add-document/>
<replace-xpath select="concat('concat ', viv:current-string())"/>
<add-content name="c"/>
<add-processed-xsl to="document">
<xsl:template match="/">
<content name="d">
<xsl:value-of select="name(viv:current-node())"/>
<xsl:value-of select="viv:current-string()"/>
</content>
</xsl:template>
</add-processed-xsl>
</match>
</parser>
<parse parser="p">ok</parse>

Output Example:

<parser name="p">
<match token="ok">
<add-document/>
<replace-xpath select="concat('concat ', viv:current-string())"/>
<add-content name="c"/>
<add-processed-xsl to="document">
<xsl:template match="/">
<content name="d">
<xsl:value-of select="name(viv:current-node())"/>
<xsl:value-of select="viv:current-string()"/>
</content>
</xsl:template>
</add-processed-xsl>
</match>
</parser>
<documents>
<document id="Ndoc0">
<content name="c" type="html" action="cluster" weight="1">concat ok</content>
<content name="d" type="html" action="cluster" weight="1">parseconcat ok</content>
</document>
</documents>