xslt - xsl:when test for processing instruction -
i´m trying create take statement, detects processing instruction
<xsl:choose> <xsl:when test="chapter/descriptive/heading='processing-instruction("xm-replace_text")'"> <xsl:template match="chapter/descriptive/heading"/> </xsl:when> <xsl:otherwise> <xsl:template match="chapter/descriptive/heading"> <fo:block font-size="16pt" font-weight="bold" font-color="red" space-before="5mm" space-after="2mm"> <xsl:number count="chapter | task | diagnosis | taskintervals | tools | lubrication | glossary" format="1.1" level="multiple"/>   <xsl:value-of select="."/> </fo:block> </xsl:template> </xsl:otherwise> </xsl:choose>
is not possible test processing instructions this?
edit: xml input (is total xml needed?)
... <chapter infoclass-1="description" prodclass-1="setup"> <descriptive prodclass-1="setup" infoclass-1="intro"> <heading><?xm-replace_text themenangabe in form einer Überschrift ?></heading> ...
no, node test processing instruction done literally e.g.
<xsl:template match="processing-instruction('xm-replace_text')">...</xsl:template>
would match pi <?xm-replace_text ...?>
.
with illustration xml assuming trying match heading
element containing particular processing instruction use
<xsl:template match="chapter/descriptive/heading[processing-instruction('xm-replace_text')]">...</xsl:template>
or
<xsl:template match="chapter/descriptive/heading/processing-instruction('xm-replace_text')">...</xsl:template>
if want match processing instruction itself.
xslt
No comments:
Post a Comment