Created
February 26, 2015 17:54
-
-
Save ewg118/6b0b99d953ae1f4d8eaf to your computer and use it in GitHub Desktop.
count tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> | |
<xsl:template match="/"> | |
<xsl:for-each select="descendant::*:fsDecl"> | |
<xsl:variable name="id" select="@xml:id"/> | |
<xsl:value-of select="*:fsDescr"/> | |
<xsl:text>: </xsl:text> | |
<xsl:value-of select="count(ancestor::*:TEI/descendant::*:fs[@type=$id])"/> | |
</xsl:for-each> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment