-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckTitlePages.xsl
More file actions
44 lines (38 loc) · 1.52 KB
/
checkTitlePages.xsl
File metadata and controls
44 lines (38 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs h"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:t="http://www.tei-c.org/ns/1.0"
xmlns="http://www.tei-c.org/ns/1.0"
version="2.0">
<xsl:template match="/">
<xsl:message><xsl:value-of select="count(//t:text)"/><xsl:text> texts </xsl:text>
<xsl:value-of select="count(//t:text[t:front])"/><xsl:text> fronts </xsl:text>
<xsl:value-of select="count(//t:text[t:front/t:div[@type='titlepage']])"/><xsl:text> titlepages </xsl:text>
</xsl:message>
<!-- <xsl:result-document href=""></xsl:result-document>
--> <xsl:apply-templates select="//t:front"/>
</xsl:template>
<xsl:template match="t:front">
<xsl:if test="t:div[@type='titlepage']">
<xsl:value-of select="ancestor::t:TEI/@xml:id"/>
<xsl:text> : </xsl:text>
<xsl:apply-templates select="t:div[@type='titlepage']"/>
<xsl:text>
</xsl:text></xsl:if>
</xsl:template>
<xsl:template match="t:p">
<xsl:value-of select="normalize-space(.)"/>
<xsl:text>|</xsl:text>
</xsl:template>
<!--<xsl:template match="* | @* | processing-instruction()">
<xsl:copy>
<xsl:apply-templates select="* | @* | processing-instruction() | comment() | text()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
<!-\- could normalize() here -\->
</xsl:template>-->
<xsl:template match="text()"/>
</xsl:stylesheet>