-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.xsl
32 lines (24 loc) · 1.27 KB
/
common.xsl
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
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:functx="http://www.functx.com"
xmlns:v="http://lenzconsulting.com/balisage2021/visualizer"
expand-text="yes"
exclude-result-prefixes="xs functx v">
<!-- By default, copy everything -->
<xsl:import href="identity.xsl"/>
<xsl:include href="functx-1.0.1-nodoc.xsl"/>
<!-- This can be optionally overridden by the importing module (or a supplied stylesheet parameter) -->
<xsl:param name="insert-note-tracking-ids" select="false()"/>
<!-- Delete all these, at least by default -->
<xsl:template match="note | backup | notations | dot | comment()"/>
<!-- Force all the preserved notes to be whole notes -->
<xsl:template mode="content" match="note/type">whole</xsl:template>
<xsl:template mode="content" match="duration">16</xsl:template>
<!-- Speed up the tempo -->
<xsl:template mode="att-value" match="@tempo">{8 * .}</xsl:template>
<!-- When enabled, insert a tracking ID for notes that we preserve (to support downstream visualizations) -->
<xsl:template mode="insert" match="note[$insert-note-tracking-ids]">
<xsl:attribute name="v:id" select="functx:path-to-node-with-pos(.)"/>
</xsl:template>
</xsl:stylesheet>