Name
<xsl:apply-templates>
Synopsis
<xsl:apply-templates [select="
pattern
" ]/>
Description
Specifies that the immediate children of the source element should be processed further. For example:
<xsl:template match="section"/> <B><xsl:apply-templates/><B> </xsl:template>
This example processes the children of the selected <section>
element after applying a bold tag. You can optionally use the
select attribute to determine which children should be
processed.
<xsl:template match="section"/> <HR> <xsl:apply-templates select="paragraph(indent)//sidebar"/> <HR> <xsl:apply-templates select="paragraph(indent)/quote"/> <HR> </xsl:template>
This example processes only specific children of the selected
<section> element. In this case, the first target is a
<sidebar> element that is a descendant of a <paragraph>
element that has defined an indent attribute. The second target is
a <quote> element that is
the direct child of a <paragraph>
element that has defined an indent attribute.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access