annotate summa/english/split.xsl @ 52:f02dd65775b6

working
author ht
date Sun, 27 Dec 2009 22:45:01 +0000
parents
children 093a560860d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
52
f02dd65775b6 working
ht
parents:
diff changeset
1 <?xml version='1.0'?>
f02dd65775b6 working
ht
parents:
diff changeset
2 <!DOCTYPE doc SYSTEM "../../../../lib/xml/xsl.dtd" >
f02dd65775b6 working
ht
parents:
diff changeset
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:x="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="x">
f02dd65775b6 working
ht
parents:
diff changeset
4
f02dd65775b6 working
ht
parents:
diff changeset
5 <xsl:output method="xhtml" indent="no"/>
f02dd65775b6 working
ht
parents:
diff changeset
6
f02dd65775b6 working
ht
parents:
diff changeset
7 <xsl:template match="x:body">
f02dd65775b6 working
ht
parents:
diff changeset
8 <xsl:variable name="pre" select="x:a[@href='summa.FP_Q1.html'][1]"/>
f02dd65775b6 working
ht
parents:
diff changeset
9 <xsl:copy>
f02dd65775b6 working
ht
parents:
diff changeset
10 <xsl:apply-templates select="@*"/>
f02dd65775b6 working
ht
parents:
diff changeset
11 <xsl:for-each select="$pre">
f02dd65775b6 working
ht
parents:
diff changeset
12 <xsl:apply-templates select="preceding-sibling::*"/>
f02dd65775b6 working
ht
parents:
diff changeset
13 <xsl:apply-templates select="."/>
f02dd65775b6 working
ht
parents:
diff changeset
14 <xsl:for-each-group select="following-sibling::*" group-starting-with="x:h1[@id='viii-p0.1']">
f02dd65775b6 working
ht
parents:
diff changeset
15 <xsl:choose>
f02dd65775b6 working
ht
parents:
diff changeset
16 <xsl:when test="position()=1">
f02dd65775b6 working
ht
parents:
diff changeset
17 <xsl:for-each-group select="current-group()" group-starting-with="x:h2"> <xsl:variable name="name" select="translate(substring-before(./@id,'-'),'.','_')"/>
f02dd65775b6 working
ht
parents:
diff changeset
18 <xsl:message>f: <xsl:value-of select="$name"/>|<xsl:value-of select="local-name()"/>|<xsl:value-of select="count(current-group())"/></xsl:message>
f02dd65775b6 working
ht
parents:
diff changeset
19 <xsl:text>&#10;</xsl:text>
f02dd65775b6 working
ht
parents:
diff changeset
20 <xi:include href="{$name}.html"/>
f02dd65775b6 working
ht
parents:
diff changeset
21 <xsl:result-document method="xhtml" href="{$name}.html">
f02dd65775b6 working
ht
parents:
diff changeset
22 <div><xsl:apply-templates select="current-group()" mode="subdoc"/></div>
f02dd65775b6 working
ht
parents:
diff changeset
23 </xsl:result-document>
f02dd65775b6 working
ht
parents:
diff changeset
24 </xsl:for-each-group>
f02dd65775b6 working
ht
parents:
diff changeset
25 <xsl:text>&#10;</xsl:text>
f02dd65775b6 working
ht
parents:
diff changeset
26 </xsl:when>
f02dd65775b6 working
ht
parents:
diff changeset
27 <xsl:otherwise>
f02dd65775b6 working
ht
parents:
diff changeset
28 <xsl:apply-templates select="current-group()"/>
f02dd65775b6 working
ht
parents:
diff changeset
29 </xsl:otherwise>
f02dd65775b6 working
ht
parents:
diff changeset
30 </xsl:choose>
f02dd65775b6 working
ht
parents:
diff changeset
31 </xsl:for-each-group>
f02dd65775b6 working
ht
parents:
diff changeset
32 </xsl:for-each></xsl:copy>
f02dd65775b6 working
ht
parents:
diff changeset
33 </xsl:template>
f02dd65775b6 working
ht
parents:
diff changeset
34
f02dd65775b6 working
ht
parents:
diff changeset
35 <xsl:template match="node()|@*">
f02dd65775b6 working
ht
parents:
diff changeset
36 <xsl:copy>
f02dd65775b6 working
ht
parents:
diff changeset
37 <xsl:apply-templates select="node()|@*"/>
f02dd65775b6 working
ht
parents:
diff changeset
38 </xsl:copy>
f02dd65775b6 working
ht
parents:
diff changeset
39 </xsl:template>
f02dd65775b6 working
ht
parents:
diff changeset
40
f02dd65775b6 working
ht
parents:
diff changeset
41 <xsl:template match="node()|@*" mode="subdoc">
f02dd65775b6 working
ht
parents:
diff changeset
42 <xsl:copy>
f02dd65775b6 working
ht
parents:
diff changeset
43 <xsl:apply-templates select="node()|@*"/>
f02dd65775b6 working
ht
parents:
diff changeset
44 </xsl:copy>
f02dd65775b6 working
ht
parents:
diff changeset
45 </xsl:template>
f02dd65775b6 working
ht
parents:
diff changeset
46 </xsl:stylesheet>