Commit 5dc6427f authored by Jean Vintache's avatar Jean Vintache
Browse files

multiples fixes but uuuhhh... still broken.

parent edc0b792
...@@ -32,24 +32,28 @@ ...@@ -32,24 +32,28 @@
<target name="apply-xslt"> <target name="apply-xslt">
<htmlcleaner src="${in}/pad.html" dest="${tmp}/pad-clean.xml"/> <htmlcleaner src="${in}/pad.html" dest="${tmp}/pad-clean.xml"/>
<xslt in="${xsl}/html2xhtml.xsl" out="${tmp}/tmpPad.xhtml" style="${xsl}/html2xhtml.xsl" /> <xslt in="${xsl}/html2xhtml.xsl" out="${tmp}/tmpPad.xhtml" style="${xsl}/html2xhtml.xsl" />
<xslt in="${tmp}/tmpPad.xhtml" out="${tmp}/tozip/content.xml" style="${xsl}/xhtml2hdoc.xsl" /> <xslt in="${tmp}/tmpPad.xhtml" out="${tmp}/tmpPad2.xhtml" style="${xsl}/html2xhtmlv2.xsl" />
<!-- a priori la tâche suivante ne sert à rien -->
<xslt in="${tmp}/tmpPad2.xhtml" out="${tmp}/tmpPad3.xhtml" style="${xsl}/html2xhtml3.xsl" />
<xslt in="${tmp}/tmpPad3.xhtml" out="${tmp}/tozip/content.xml" style="${xsl}/xhtml2hdoc.xsl" />
</target> </target>
<!-- Builds Hdoc structure --> <!-- Builds Hdoc structure -->
<target name="construct_hdoc"> <target name="construct_hdoc">
<mkdir dir="${tmp}/tozip/" /> <mkdir dir="${tmp}/tozip/" />
<mkdir dir="${tmp}/META-INF/" />
<mkdir dir="${tmp}/tozip/META-INF" /> <mkdir dir="${tmp}/tozip/META-INF" />
<!-- container --> <!-- container -->
<touch file="${tmp}/tozip/META-INF/container.xml" /> <touch file="${tmp}/META-INF/container.xml" />
<echoxml file="${tmp}/tozip/META-INF/container.xml"> <echoxml file="${tmp}/META-INF/container.xml">
<container version="1.0"> <container version="1.0">
<rootfiles> <rootfiles>
<rootfile full-path="${rootfilename}" media-type="text/xml" /> <rootfile full-path="${rootfilename}" media-type="text/xml" />
</rootfiles> </rootfiles>
</container> </container>
</echoxml> </echoxml>
<xslt classpath="lib/saxon9he.jar" in="${tmp}/tozip/META-INF/container.xml" out="${tmp}/META-INF/container.xml" style="${xsl}/addNamespaceToContainer.xsl"/> <xslt in="${tmp}/META-INF/container.xml" out="${tmp}/tozip/META-INF/container.xml" style="${xsl}/addNamespaceToContainer.xsl"/>
<!-- mimetype --> <!-- mimetype -->
<touch file="${tmp}/mimetype" /> <touch file="${tmp}/mimetype" />
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<xsl:strip-space elements="*"/> <xsl:strip-space elements="*"/>
<xsl:param name="text-encoding" as="xs:string" select="'utf-8'"/> <xsl:param name="text-encoding" as="xs:string" select="'utf-8'"/>
<xsl:param name="text-uri" as="xs:string" select="'../input/test.html'"/> <xsl:param name="text-uri" as="xs:string" select="'../input/pad.html'"/>
<xsl:template name="text2xml"> <xsl:template name="text2xml">
<xsl:variable name="text" select="unparsed-text($text-uri, $text-encoding)"/> <xsl:variable name="text" select="unparsed-text($text-uri, $text-encoding)"/>
......
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
<header> <header>
<h1>Contenu</h1> <h1>Contenu</h1>
</header> </header>
<div> <xsl:apply-templates select="/html/body/div"/>
<xsl:apply-templates select="/html/body/div"/>
</div>
</section> </section>
</body> </body>
</html> </html>
...@@ -46,12 +44,18 @@ ...@@ -46,12 +44,18 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<!--
<xsl:template match="@* | node()"> <xsl:template match="@* | node()">
<xsl:copy> <xsl:copy>
<xsl:apply-templates select="@* | node()"/> <xsl:apply-templates select="@* | node()"/>
</xsl:copy> </xsl:copy>
</xsl:template> </xsl:template>
-->
<xsl:template match="/">
<xsl:apply-templates select="*"></xsl:apply-templates>
</xsl:template>
<!-- Namespace substitution for hdoc elements --> <!-- Namespace substitution for hdoc elements -->
<xsl:template match="*"> <xsl:template match="*">
<xsl:element name="{local-name()}"> <xsl:element name="{local-name()}">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment