incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robw...@apache.org
Subject svn commit: r794863 - in /websites/production/odftoolkit: ./ content/odftoolkit/xsltrunner/ODFXSLTRunnerExamples.html
Date Wed, 24 Aug 2011 23:56:16 GMT
Author: robweir
Date: Wed Aug 24 23:56:15 2011
New Revision: 794863

Log:
Publishing merge to odftoolkit site by robweir

Modified:
    websites/production/odftoolkit/   (props changed)
    websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerExamples.html

Propchange: websites/production/odftoolkit/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 24 23:56:15 2011
@@ -1 +1 @@
-/websites/staging/odftoolkit/trunk:794771-794856
+/websites/staging/odftoolkit/trunk:794771-794862

Modified: websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerExamples.html
==============================================================================
--- websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerExamples.html
(original)
+++ websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerExamples.html
Wed Aug 24 23:56:15 2011
@@ -21,7 +21,7 @@
 
 <link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
 
-<title></title>
+<title>ODF XSLT Runner and ODF XSLT Runner Task Examples</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
 </head>
@@ -77,33 +77,62 @@
   </div>
   <div id="contenta">
   
-    
-    <p>= ODF XSLT Runner and ODF XSLT Runner Task Examples =</p>
-<p><strong>TOC</strong></p>
-<p>== XHTML ==</p>
-<p>The XHTML transformation contained in [http://www.openoffice.org OpenOffice.org]
can be used to transform ODF documents into XHTML. Using '''ODFXSLTRunner''' it is not even
required to extract the ODF package.</p>
-<p>The XHTML style sheet runs only with the [http://saxon.sourceforge.net/ SAXON XSLT
Processor]. Using version 9.1 is recommended.</p>
-<p>The following command converts an ODF text document ''&lt;ODT&gt;'' into
an XHTML document ''&lt;XHTML&gt;'':</p>
-<p>java -cp odfxsltrunner.jar:&lt;saxon.jar&gt; org.odftoolkit.odfxsltrunner.Main
-   -f net.sf.saxon.TransformerFactoryImpl  -x Pictures/ 
-  &lt;ooo-xslt&gt;/export/xhtml/opendoc2xhtml.xsl &lt;ODT&gt; -o &lt;XHTML&gt;</p>
-<p>''&lt;saxon.jar&gt;'' is the jar of the [http://saxon.sourceforge.net/ SAXON
XSLT Processor].  &lt;ooo-xslt&gt; is the location of the OpenOffice.org XSLT stylesheets
within an OpenOffice.org installation. In a typical OpenOffice.org installation, this is <tt>openoffice.org/basis3.3/share/xslt</tt>
(Linux) or <tt>Basis/share/xslt</tt> (Windows).</p>
-<p>'''Note:''' A few changes are necessary to use OpenOffice.org's XHTML transformation
with '''ODFXSLTRunner'''. These are available as patch in the OpenOffice.org issue [http://qa.openoffice.org/issues/show_bug.cgi?id=115881
i115881].</p>
-<p>== XHTML with referenced images only ==
-The XHTML  transformation in the above example extracts all images from the ODF document,
regardless whether these are referenced in the XHTML document. To extract only the images
that are referenced a list of referenced images may be created by  the '''create-html-img-list.xsl'''
style sheet that is contained in the '''sample-xslt''' folder of '''ODFXSLTRunner'''. It is
applied to the XHTML file, and the target is a text file that contains the references images.
Although the input file is an XHTML rather than a ODF file, '''ODFXSLTRunner''' may be used
to apply the style sheet.</p>
-<p>java -jar odfxsltrunner.jar create-html-img-list.xsl -i &lt;XHTML&gt; -o
&lt;img-list&gt; 
- unzip &lt;ODT&gt; <code>&amp;lt;img-list&amp;gt;</code></p>
-<p>== Replace embedded objects with bitmap images ===
-Unlike [http://www.openoffice.org OpenOffice.org]'s HTML filter, the XSLT-based XHTML filter
does not convert embedded objects into bitmap images. It is however possible to replace the
embedded objects of ODF document with the images that the HTML filter has exported by applying
the '''replace-object.xsl''' style sheet that is contained in the '''sample-xslt''' folder
of '''ODFXSLTRunner''' to the ODF document.</p>
-<p>The following steps are required:
-<em> Load the ODT document into OpenOffice.org and save it with the HTML filter. The
file may have an arbitrary name. ''&lt;ooo-html-file&gt;'' is used as a placeholder
here.
-</em> Convert the HTML file into an XHTML file. You may use '''xmllint''' for this
purpose, which is part of [http://xmlsoft.org/ libxml2], or any other tools that converts
HTML into XHTML. The command line for '''xmllint''' is:
- xmllint --html --xmlout --dropdtd -o &lt;ooo-xhtml-file&gt; &lt;ooo-html-file&gt;
-<em> Apply the '''replace-object.xsl''' style sheet to the ODF document. The style
sheet requires the name of the XHTML file converted in the previous step as '''hrml-ref'''
parameter.
+    <h1 class="title">ODF XSLT Runner and ODF XSLT Runner Task Examples</h1>
+    <h2 id="xhtml">XHTML</h2>
+<p>The XHTML transformation contained in <a href="http://www.openoffice.org">OpenOffice.org</a>
can be used to 
+transform ODF documents into XHTML. Using <strong>ODFXSLTRunner</strong> it is
not even 
+required to extract the ODF package.</p>
+<p>The XHTML style sheet runs only with the <a href="http://saxon.sourceforge.net/">SAXON
XSLT Processor</a>. 
+Using version 9.1 is recommended.</p>
+<p>The following command converts an ODF text document <strong>&lt;ODT&gt;</strong>
into 
+an XHTML document <strong>&lt;XHTML&gt;</strong>: </p>
+<div class="codehilite"><pre><span class="n">java</span> <span
class="o">-</span><span class="n">cp</span> <span class="n">odfxsltrunner</span><span
class="o">.</span><span class="n">jar:</span><span class="sr">&lt;saxon.jar&gt;</span>
<span class="n">org</span><span class="o">.</span><span class="n">odftoolkit</span><span
class="o">.</span><span class="n">odfxsltrunner</span><span class="o">.</span><span
class="n">Main</span>
+   <span class="o">-</span><span class="n">f</span> <span class="n">net</span><span
class="o">.</span><span class="n">sf</span><span class="o">.</span><span
class="n">saxon</span><span class="o">.</span><span class="n">TransformerFactoryImpl</span>
 <span class="o">-</span><span class="n">x</span> <span class="n">Pictures</span><span
class="o">/</span> 
+  <span class="sr">&lt;ooo-xslt&gt;/export/x</span><span class="n">html</span><span
class="o">/</span><span class="n">opendoc2xhtml</span><span class="o">.</span><span
class="n">xsl</span> <span class="sr">&lt;ODT&gt;</span> <span
class="o">-</span><span class="n">o</span> <span class="sr">&lt;XHTML&gt;</span>
+</pre></div>
+
+
+<p><em>&lt;saxon.jar&gt;</em> is the jar of the <a href="http://saxon.sourceforge.net/">SAXON</a>
XSLT Processor.  <em>&lt;ooo-xslt&gt;</em> 
+is the location of the OpenOffice.org XSLT stylesheets within an OpenOffice.org 
+installation. In a typical OpenOffice.org installation, this is 
+<tt>openoffice.org/basis3.3/share/xslt</tt> (Linux) or <tt>Basis/share/xslt</tt>
(Windows).</p>
+<p><strong><em>Note:</em></strong> A few changes are necessary
to use OpenOffice.org's XHTML 
+transformation with <strong>ODFXSLTRunner</strong>. These are available as patch
in the 
+OpenOffice.org issue <a href="http://qa.openoffice.org/issues/show_bug.cgi?id=115881">i115881</a>.</p>
+<h2 id="xhtml_with_referenced_images_only">XHTML with referenced images only</h2>
+<p>The XHTML  transformation in the above example extracts all images from the 
+ODF document, regardless whether these are referenced in the XHTML document. 
+To extract only the images that are referenced a list of referenced images 
+may be created by  the <strong>create-html-img-list.xsl</strong> style sheet
that is 
+contained in the <strong>sample-xslt</strong> folder of <strong>ODFXSLTRunner</strong>.
It is applied 
+to the XHTML file, and the target is a text file that contains the references 
+images. Although the input file is an XHTML rather than a ODF file, 
+<strong>ODFXSLTRunner</strong> may be used to apply the style sheet.</p>
+<div class="codehilite"><pre><span class="n">java</span> <span
class="o">-</span><span class="n">jar</span> <span class="n">odfxsltrunner</span><span
class="o">.</span><span class="n">jar</span> <span class="n">create</span><span
class="o">-</span><span class="n">html</span><span class="o">-</span><span
class="n">img</span><span class="o">-</span><span class="n">list</span><span
class="o">.</span><span class="n">xsl</span> <span class="o">-</span><span
class="n">i</span> <span class="sr">&lt;XHTML&gt;</span> <span
class="o">-</span><span class="n">o</span> <span class="sr">&lt;img-list&gt;</span>

+ <span class="n">unzip</span> <span class="sr">&lt;ODT&gt;</span>
<span class="sb">`&lt;img-list&gt;`</span>
+</pre></div>
+
+
+<h2 id="replace_embedded_objects_with_bitmap_images">Replace embedded objects with
bitmap images</h2>
+<p>Unlike OpenOffice.org's HTML filter, the XSLT-based XHTML filter does not 
+convert embedded objects into bitmap images. It is however possible to 
+replace the embedded objects of ODF document with the images that the 
+HTML filter has exported by applying the <strong>replace-object.xsl</strong>
style sheet 
+that is contained in the <strong>sample-xslt</strong> folder of <strong>ODFXSLTRunner</strong>
to the 
+ODF document.</p>
+<p>The following steps are required:</p>
+<ul>
+<li>Load the ODT document into OpenOffice.org and save it with the HTML
+    filter. The file may have an arbitrary name.
+    <strong>&lt;ooo-html-file&gt;</strong> is used as a placeholder here.</li>
+<li>Convert the HTML file into an XHTML file. You may use <strong>xmllint</strong>
for this purpose, which is part of <a href="http://xmlsoft.org/">libxml2</a>,
or any other tools that converts HTML into XHTML. The command line for <strong>xmllint</strong>
is:
+ xmllint --html --xmlout --dropdtd -o &lt;ooo-xhtml-file&gt; &lt;ooo-html-file&gt;</li>
+<li>Apply the <strong>replace-object.xsl</strong> style sheet to the ODF
document. The style sheet requires the name of the XHTML file converted in the previous step
as '''hrml-ref''' parameter.
  java -jar odfxsltrunner.jar replace-objects.xsl &lt;input odf&gt; &lt;output
odf&gt; 
-  ref-html=&lt;ooo-xhtml-file&gt;
-</em> Zip the images that OpenOffice.org has saved next to the HTML document into the
output ODF file.
-The new ODF file now can be transformed to XHTML with OpenOffice.org's XHTML transformation.</p>
+  ref-html=&lt;ooo-xhtml-file&gt;</li>
+<li>Zip the images that OpenOffice.org has saved next to the HTML document into the
output ODF file.
+The new ODF file now can be transformed to XHTML with OpenOffice.org's XHTML transformation.</li>
+</ul>
   </div>
 
   <div id="footera">



Mime
View raw message