Commit 968d924e authored by Raphaël's avatar Raphaël

content.xml and container.xml validations disabled to allow opale_to_pdf.ant call

parent 4c930410
...@@ -77,6 +77,7 @@ Generic Todo ...@@ -77,6 +77,7 @@ Generic Todo
* Generate the ToC according to the converted (by XSL) headings of the hdoc * Generate the ToC according to the converted (by XSL) headings of the hdoc
* Handle as fully as possible of widows and girl orphans; trying to match Prince's layout and implementing the suitable CSS rules (which shall not be interpreted by FS) * Handle as fully as possible of widows and girl orphans; trying to match Prince's layout and implementing the suitable CSS rules (which shall not be interpreted by FS)
* Allow the user to override some specific CSS rules, according to the main layout logical rules * Allow the user to override some specific CSS rules, according to the main layout logical rules
* Manage container.xml and content.xml validations using jing as jing task can't be handled with opale_to_pdf.ant call.
* Bonus: find out a HTML editor to manually add line breaks to a hdoc file in order to resolve widows and girl orphans problems after the PDF file's generation * Bonus: find out a HTML editor to manually add line breaks to a hdoc file in order to resolve widows and girl orphans problems after the PDF file's generation
......
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
<pathelement location="lib/ant-contrib.jar"/> <pathelement location="lib/ant-contrib.jar"/>
</classpath> </classpath>
</taskdef> </taskdef>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/> <!--<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="lib/jing.jar"/>
</classpath>
</taskdef>-->
<!-- Arguments properties --> <!-- Arguments properties -->
<property name="InputPath" location="input"/> <property name="InputPath" location="input"/>
...@@ -66,14 +70,14 @@ ...@@ -66,14 +70,14 @@
<chmod dir="${tmpdir}" perm="777"/> <chmod dir="${tmpdir}" perm="777"/>
<!-- Validating the XML container file --> <!-- Validating the XML container file -->
<trycatch property="foo" reference="bar"> <!--<trycatch property="foo" reference="bar">
<try> <try>
<jing file="${tmpdir}/META-INF/container.xml" rngfile="${Schema}/container/hdoc1-container.rng"></jing> <jing file="${tmpdir}/META-INF/container.xml" rngfile="${Schema}/container/hdoc1-container.rng"></jing>
</try> </try>
<catch> <catch>
<echo>Validation failed</echo> <echo>Validation failed</echo>
</catch> </catch>
</trycatch> </trycatch>-->
<!-- Launches the XSLT find_content to retrieve the content path --> <!-- Launches the XSLT find_content to retrieve the content path -->
<xslt in="${tmpdir}/META-INF/container.xml" out="${tmpdir}/prepare_hdoc.ant" classpath="./lib/saxon9he.jar" style="xsl/find_content.xsl"> <xslt in="${tmpdir}/META-INF/container.xml" out="${tmpdir}/prepare_hdoc.ant" classpath="./lib/saxon9he.jar" style="xsl/find_content.xsl">
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
<project name="hdoc_to_pdf" basedir=".." default="main"> <project name="hdoc_to_pdf" basedir=".." default="main">
<property name="lib" location="lib"/> <property name="lib" location="lib"/>
<property name="Schema" location="schemas"/> <property name="Schema" location="schemas"/>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"> <!--<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath> <classpath>
<pathelement location="${lib}/jing.jar"/> <pathelement location="${lib}/jing.jar"/>
</classpath> </classpath>
</taskdef> </taskdef>-->
<target name="main"> <target name="main">
<xsl:apply-templates/> <xsl:apply-templates/>
</target> </target>
...@@ -48,14 +48,14 @@ ...@@ -48,14 +48,14 @@
<echo message="Filename : {$filename}"/> <echo message="Filename : {$filename}"/>
<echo message="Dirpath : {$dirpath}"/> <echo message="Dirpath : {$dirpath}"/>
<trycatch property="foo" reference="bar"> <!--<trycatch property="foo" reference="bar">
<try> <try>
<jing file="{$TempDirectory}/{$path}" rngfile="${{Schema}}/xhtml/hdoc1-xhtml.rng"></jing> <jing file="{$TempDirectory}/{$path}" rngfile="${{Schema}}/xhtml/hdoc1-xhtml.rng"></jing>
</try> </try>
<catch> <catch>
<echo>Validation failed</echo> <echo>Validation failed</echo>
</catch> </catch>
</trycatch> </trycatch>-->
<copy file="{$BaseDirectory}/css/main.css" tofile="{$dirpath}/main.css"/> <copy file="{$BaseDirectory}/css/main.css" tofile="{$dirpath}/main.css"/>
<copy file="{$BaseDirectory}/font/cmunrm.ttf" tofile="{$dirpath}/cmunrm.ttf"/> <copy file="{$BaseDirectory}/font/cmunrm.ttf" tofile="{$dirpath}/cmunrm.ttf"/>
......
Markdown is supported
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