|
52
|
1 <?xml version='1.0'?>
|
|
|
2 <!DOCTYPE doc SYSTEM "../../../../lib/xml/xsl.dtd" >
|
|
|
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">
|
|
|
4
|
|
|
5 <xsl:output method="xhtml" indent="no"/>
|
|
|
6
|
|
|
7 <xsl:template match="x:body">
|
|
|
8 <xsl:variable name="pre" select="x:a[@href='summa.FP_Q1.html'][1]"/>
|
|
|
9 <xsl:copy>
|
|
|
10 <xsl:apply-templates select="@*"/>
|
|
|
11 <xsl:for-each select="$pre">
|
|
|
12 <xsl:apply-templates select="preceding-sibling::*"/>
|
|
|
13 <xsl:apply-templates select="."/>
|
|
|
14 <xsl:for-each-group select="following-sibling::*" group-starting-with="x:h1[@id='viii-p0.1']">
|
|
|
15 <xsl:choose>
|
|
|
16 <xsl:when test="position()=1">
|
|
|
17 <xsl:for-each-group select="current-group()" group-starting-with="x:h2"> <xsl:variable name="name" select="translate(substring-before(./@id,'-'),'.','_')"/>
|
|
|
18 <xsl:message>f: <xsl:value-of select="$name"/>|<xsl:value-of select="local-name()"/>|<xsl:value-of select="count(current-group())"/></xsl:message>
|
|
|
19 <xsl:text> </xsl:text>
|
|
|
20 <xi:include href="{$name}.html"/>
|
|
|
21 <xsl:result-document method="xhtml" href="{$name}.html">
|
|
|
22 <div><xsl:apply-templates select="current-group()" mode="subdoc"/></div>
|
|
|
23 </xsl:result-document>
|
|
|
24 </xsl:for-each-group>
|
|
|
25 <xsl:text> </xsl:text>
|
|
|
26 </xsl:when>
|
|
|
27 <xsl:otherwise>
|
|
|
28 <xsl:apply-templates select="current-group()"/>
|
|
|
29 </xsl:otherwise>
|
|
|
30 </xsl:choose>
|
|
|
31 </xsl:for-each-group>
|
|
|
32 </xsl:for-each></xsl:copy>
|
|
|
33 </xsl:template>
|
|
|
34
|
|
|
35 <xsl:template match="node()|@*">
|
|
|
36 <xsl:copy>
|
|
|
37 <xsl:apply-templates select="node()|@*"/>
|
|
|
38 </xsl:copy>
|
|
|
39 </xsl:template>
|
|
|
40
|
|
|
41 <xsl:template match="node()|@*" mode="subdoc">
|
|
|
42 <xsl:copy>
|
|
|
43 <xsl:apply-templates select="node()|@*"/>
|
|
|
44 </xsl:copy>
|
|
|
45 </xsl:template>
|
|
|
46 </xsl:stylesheet>
|