find_content.xsl 1.19 KB
Newer Older
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
<?xml version="1.0" encoding="UTF-8"?>
<!--find_content.xsl creates a ANT file prepare_hdoc.ant-->
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
    xmlns:h="urn:utc.fr:ics:hdoc:container"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xsl:param name="TempRepository" required="yes" as="xs:string"/>
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="h:container">
        <project name="hdoc_to_pdf" default="main">
            <target name="main">
                <xsl:apply-templates/>
            </target>
        </project>
    </xsl:template>
    
    <xsl:template match="h:rootfiles">
        <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="h:rootfile">
        <xsl:variable name="path" select="@full-path"/>

        <xslt in="{$TempRepository}/{$path}" out="{$TempRepository}/hdoc_nsless.xhtml" style="xsl/ns_remover.xsl"/>
        <xslt in="{$TempRepository}/hdoc_nsless.xhtml" out="{$TempRepository}/flat_hdoc.xhtml" style="xsl/hdoc_flattenizer.xsl"/>
26
        <xslt in="{$TempRepository}/flat_hdoc.xhtml" out="{$TempRepository}/final.xhtml" style="xsl/last_transformer.xsl"/>
27 28
    </xsl:template>
</xsl:stylesheet>