Skip to content

Commit

Permalink
Update attribute reflection.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jul 16, 2022
1 parent 5c2349c commit 981deaa
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion xsl/xslfo.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,24 @@

<xsl:import href="../cfg/fo/attrs/prismjs-attr.xsl"/>


<xsl:template name="processPrismAttrSetReflection">
<xsl:param name="attrSet"/>
<xsl:param name="path"/>
<xsl:apply-templates select="document($path)//xsl:attribute-set[@name = $attrSet]"/>

<xsl:for-each select="document($path)//xsl:attribute-set[@name = $attrSet]/xsl:attribute">
<xsl:attribute name="{@name}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>

<xsl:if test="document($path)//xsl:attribute-set[@name = $attrSet]/@use-attribute-sets">
<xsl:call-template name="processPrismAttrSetReflection">
<xsl:with-param name="attrSet" select="document($path)//xsl:attribute-set[@name = $attrSet]/@use-attribute-sets"/>
<xsl:with-param name="path" select="'../cfg/fo/attrs/prismjs-attr.xsl'"/>
</xsl:call-template>
</xsl:if>

</xsl:template>

<xsl:template match="*[contains(@class,' topic/ph ') and contains(@outputclass, 'token')]">
Expand Down

0 comments on commit 981deaa

Please sign in to comment.