Commits

tbrugz committed ae2c937

refatorando build ; adicionado parametro 'ignore.image.scaling' para saída html

Comments (0)

Files changed (6)

 
 _para gerar o TCC de teste:_
 
-* copiar `xsl/docbook-tcc-input.template.xsl` para `xsl/docbook-tcc-input.xsl` e (opcional) alterá-lo
+* copiar `xsl/docbook-tcc-input-definitions.template.xsl` para `xsl/docbook-tcc-input-definitions.xsl` e (opcional) alterá-lo
 * (opcional) copiar `local.template.properties` para `local.properties` e alterá-lo 
 * ant: build-all: gera PDF, RTF, EPUB e HTML (em página única ou diversas - _chunked_)
 
 	<!-- fop properties -->
 	<property name="file.xmlinput" value="${srcfiles.dir}/docbook-tcc-input.xml"/>
 	<property name="csv-tables-dir" value="${srcfiles.dir}/tables-csv"/>
-	<property name="file.xsl" value="${xsl.dir}/docbook-fop-tcc-input.xsl"/>
-	<!-- property name="file-epub.xsl" value="${srcfiles.dir}/docbook-tcc-input-epub.xsl"/ --> <!-- not used... -->
+	
+	<property name="file.fop.xsl" value="${xsl.dir}/docbook-fop-tcc-input.xsl"/>
+	<property name="file.epub.xsl" value="${xsl.dir}/docbook-epub-tcc-input.xsl"/>
+	<property name="file.html.xsl" value="${xsl.dir}/docbook-html-tcc-input.xsl"/>
+	<property name="file.htmlchunked.xsl" value="${xsl.dir}/docbook-htmlchunked-tcc-input.xsl"/>
+	
 	<property name="file.pdfoutput" value="${dist}/tcc-output.pdf"/>
 	<property name="file.rtfoutput" value="${dist}/tcc-output.rtf"/>
 	<property name="file.epub.builddir" value="${build}/epub"/>
 		    <arg value="-xml"/>
 		    <arg value="${file.xmlinput}"/>
 		    <arg value="-xsl"/>
-		    <arg value="${file.xsl}"/>
+		    <arg value="${file.fop.xsl}"/>
 		    <arg value="-pdf"/>
 		    <arg value="${file.pdfoutput}"/>
 		</java>
 	<target name="run-proc-fop-test" depends="prepare">
 		<java classname="tbrugz.fop.FOP_Proc" classpathref="foppath" fork="true" dir="${srcfiles.dir}">
 			<arg value="${file.xmlinput}"/>
-			<arg value="${file.xsl}"/>
+			<arg value="${file.fop.xsl}"/>
 			<arg value="${file.pdfoutput}"/>
 		</java>
 	</target>
 		    <arg value="${file.xmlinput}"/>
 		    <arg value="-xsl"/>
 		    <!--arg value="${docbook-xsl-dir}/epub/docbook.xsl"/-->
-		    <arg value="${xsl.dir}/docbook-epub-tcc-input.xsl"/>
+		    <arg value="${file.epub.xsl}"/>
 		    <arg value="-out"/>
 		    <arg value="${file.epub.builddir}/tcc-output-epub.xml"/>
 		</java>
 		    <arg value="-in"/>
 		    <arg value="${file.xmlinput}"/>
 		    <arg value="-xsl"/>
-		    <arg value="${xsl.dir}/docbook-html-tcc-input.xsl"/>
+		    <arg value="${file.html.xsl}"/>
 		    <!--arg value="${docbook-xsl-dir}/html/docbook.xsl"/-->
 		    <arg value="-out"/>
 		    <arg value="${file.html.output}"/>
 		    <arg value="-in"/>
 		    <arg value="${file.xmlinput}"/>
 		    <arg value="-xsl"/>
-		    <arg value="${xsl.dir}/docbook-htmlchunked-tcc-input.xsl"/>
+		    <arg value="${file.htmlchunked.xsl}"/>
 		    <arg value="-out"/>
 		    <arg value="${file.htmlchunked.outputdir}/index.html"/>
 		</java>
 		    <arg value="-xml"/>
 		    <arg value="${file.xmlinput}"/>
 		    <arg value="-xsl"/>
-		    <arg value="${file.xsl}"/>
+		    <arg value="${file.fop.xsl}"/>
 		    <arg value="-rtf"/>
 		    <arg value="${file.rtfoutput}"/>
 		</java>
 		<java classname="org.apache.xalan.xslt.EnvironmentCheck" classpathref="foppath" />
 
 		<available file="${file.xmlinput}" property="file.xmlinput.exists" />
-		<available file="${file.xsl}" property="file.xsl.exists" />
+		<available file="${file.fop.xsl}" property="file.fop.xsl.exists" />
+		<available file="${file.epub.xsl}" property="file.epub.xsl.exists" />
+		<available file="${file.html.xsl}" property="file.html.xsl.exists" />
+		<available file="${file.htmlchunked.xsl}" property="file.htmlchunked.xsl.exists" />
 		<property name="file.xmlinput.exists" value="false"/>
-		<property name="file.xsl.exists" value="false"/>
+		<property name="file.fop.xsl.exists" value="false"/>
+		<property name="file.epub.xsl.exists" value="false"/>
+		<property name="file.html.xsl.exists" value="false"/>
+		<property name="file.htmlchunked.xsl.exists" value="false"/>
 		
 		<echo message="XML: ${file.xmlinput} [exists? ${file.xmlinput.exists}]" />
-		<echo message="XSL: ${file.xsl} [exists? ${file.xsl.exists}]" />
+		<echo message="XSL-fop: ${file.fop.xsl} [exists? ${file.fop.xsl.exists}]" />
+		<echo message="XSL-epub: ${file.epub.xsl} [exists? ${file.epub.xsl.exists}]" />
+		<echo message="XSL-html: ${file.html.xsl} [exists? ${file.html.xsl.exists}]" />
+		<echo message="XSL-htmlchunked: ${file.htmlchunked.xsl} [exists? ${file.htmlchunked.xsl.exists}]" />
+		
 		<echo message="out-PDF: ${file.pdfoutput}" />
 		<echo message="out-RTF: ${file.rtfoutput}" />
 		<echo message="out-EPUB: ${file.epub.output}" />
 			<condition>
 				<not>
 					<resourcecount count="2">
-						<fileset dir="." includes="${file.xmlinput.exists}, ${file.xsl.exists}"/>
+						<fileset dir="." includes="${file.xmlinput.exists}, ${file.fop.xsl.exists}"/>
 					</resourcecount>
 				</not>
 			</condition>

local.template.properties

 #
 
 file.xmlinput=test_docbook/docbook-tcc-input.xml
-file.xsl=xsl/docbook-tcc-input.xsl
 csv-tables-dir=test_docbook/tables-csv/
 srcfiles.dir=test_docbook/
 
+#file.fop.xsl=xsl/docbook-fop-tcc-input.xsl
+#file.epub.xsl=xsl/docbook-epub-tcc-input.xsl
+#file.html.xsl=xsl/docbook-html-tcc-input.xsl
+#file.htmlchunked.xsl=xsl/docbook-htmlchunked-tcc-input.xsl
+
 #file.pdfoutput=dist/tcc-output.pdf
 #file.rtfoutput=dist/tcc-output.rtf
 #file.epub.output=dist/tcc-output.epub

test_docbook/docbook-tcc-input.xml

 <!-- titleabbrev>Uso do tempo no Reino Unido, 1856-1998</titleabbrev -->
 <mediaobject>
   <imageobject>
-    <imagedata fileref="figures/nordhaus,2000_time_use_v2.png" scale="50"/>
+    <imagedata fileref="figures/nordhaus,2000_time_use_v2.png" width="75%" scalefit="1"/>
   </imageobject>
 </mediaobject>
 </figure>

xsl/html-tcc-eco.xsl

 	xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"	
 	version="1.0">
 
+<!-- scaling attributes will be ignored for HTML output, see: http://www.sagehill.net/docbookxsl/ImageSizing.html -->
+<xsl:param name="ignore.image.scaling">1</xsl:param>
+
 <!-- ===================== revisăo, emphasis ============== -->
 
 <!-- http://www.docbook.org/tdg/en/html/ref-elements.html#common.attributes -->
 	xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"	
 	version="1.0">
 
-<!-- ===================== imports & definitions ============== -->
+<!-- ===================== imports ============== -->
 
 
 <xsl:import href="../../tcc-eco-docbook/docbook-xsl-1.76.1-RC1/fo/docbook.xsl"/>
 <xsl:include href="tcc-eco-xtra.xsl"/>
 <xsl:include href="../build/tcc-eco-xsltemplate-out.xsl"/> 
 
-<!--
-dbk.ufrgs.eco.versao: "digital" ou "impressao" - versăo digital bota links externos em azul
-dbk.ufrgs.eco.marcaralteracoes: "<qqr coisa>" ou "" - mostra alteraçőes '<emphasis revisionflag="changed">' e '<emphasis revisionflag="added">' com fundo amarelo
-dbk.ufrgs.eco.mostrarnotas: "<qqr coisa>" ou "" - mostra ou năo notas '<emphasis role="note">'
- -->
-<xsl:param name="dbk.ufrgs.eco.versao">digital</xsl:param> <!-- ou: impressao -->
-<xsl:param name="dbk.ufrgs.eco.marcaralteracoes">x</xsl:param>
-<xsl:param name="dbk.ufrgs.eco.mostrarnotas">x</xsl:param>
-
 
 <!-- ===================== main config ============== -->