diff options
Diffstat (limited to 'Master/texmf-dist/tex4ht/xtpipes/oo-text.4xt')
-rwxr-xr-x | Master/texmf-dist/tex4ht/xtpipes/oo-text.4xt | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex4ht/xtpipes/oo-text.4xt b/Master/texmf-dist/tex4ht/xtpipes/oo-text.4xt new file mode 100755 index 00000000000..163f35bde5f --- /dev/null +++ b/Master/texmf-dist/tex4ht/xtpipes/oo-text.4xt @@ -0,0 +1,181 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE xtpipes SYSTEM "xtpipes.dtd" > +<xtpipes preamble="yes" signature="oo-text.4xt (2008-02-20-10:22)"> + <sax content-handler="xtpipes.util.ScriptsManager,tex4ht.OoFilter" + lexical-handler="xtpipes.util.ScriptsManagerLH" > + <script element="table:table" > + <dom name="." xml="." method="table" class="tex4ht.OoUtilities" /> + + </script> + <script element="text:p" > + <set name="text-p" > + <![CDATA[ + <xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + + xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" + xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" + xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" + xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + xmlns:math="http://www.w3.org/1998/Math/MathML" + xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" + xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" + xmlns:ooo="http://openoffice.org/2004/office" + xmlns:ooow="http://openoffice.org/2004/writer" + xmlns:oooc="http://openoffice.org/2004/calc" + xmlns:dom="http://www.w3.org/2001/xml-events" + xmlns:xforms="http://www.w3.org/2002/xforms" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + > + <xsl:output omit-xml-declaration = "yes" /> + + <xsl:template match="text:p[ (count(child::*)=1) + and child::draw:frame + and parent::text:p + ]" > + <xsl:apply-templates select="child::draw:frame" /> +</xsl:template> +<xsl:template match="text:p[ + child::text:p + and + (count(child::text:p) = count(child::*)) + ]" > + <xsl:copy> + <xsl:attribute name="text:style-name"> + <xsl:text>start_</xsl:text> + <xsl:value-of select="@text:style-name" /> + </xsl:attribute> + <xsl:comment> + <xsl:text>start </xsl:text> + <xsl:value-of select=" @text:style-name " /> + </xsl:comment> + </xsl:copy> + <xsl:apply-templates select="*|text()|comment()" mode="nested-p" /> + <xsl:copy> + <xsl:attribute name="text:style-name"> + <xsl:text>end_</xsl:text> + <xsl:value-of select="@text:style-name" /> + </xsl:attribute> + <xsl:comment> + <xsl:text>end </xsl:text> + <xsl:value-of select=" @text:style-name " /> + </xsl:comment> + </xsl:copy> +</xsl:template> +<xsl:template match="*[not(text:p)]|text()|comment()" mode="nested-p" > + <xsl:copy/> +</xsl:template> +<xsl:template match="text:p" mode="nested-p" > + <xsl:copy> + <xsl:attribute name="text:style-name"> + <xsl:value-of select="parent::text:p/@text:style-name" /> + <xsl:text>_</xsl:text> + <xsl:value-of select="@text:style-name" /> + <xsl:text>_</xsl:text> + <xsl:value-of select="child::*[1]/@text:style-name" /> + </xsl:attribute> + <xsl:apply-templates select="@*[ name() != 'text:style-name' ]" /> + <xsl:apply-templates select="*|text()|comment()" /> + </xsl:copy> +</xsl:template> + + <xsl:template match="text:p[ child::text:span[ + starts-with(@text:style-name, 'multicolumn-') + ] ]" > + <xsl:copy> + <xsl:apply-templates + select="child::text:span[ + starts-with(@text:style-name, 'multicolumn-') ] + /@* + " /> + <xsl:apply-templates select="*|text()|comment()" /> + </xsl:copy> +</xsl:template> +<xsl:template match="text:span[ + starts-with(@text:style-name, 'multicolumn-') ]" /> + + <xsl:template match="*|@*|text()|comment()" > + <xsl:copy> + <xsl:apply-templates select="*|@*|text()|comment()" /> + </xsl:copy> + </xsl:template> + </xsl:stylesheet> +]]> + +</set> +<xslt name="." xml="." xsl="text-p" /> + + </script> + <script element="text:h" > + <set name="algorithmic" > + <![CDATA[ + <xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + + xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" + xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" + xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" + xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + xmlns:math="http://www.w3.org/1998/Math/MathML" + xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" + xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" + xmlns:ooo="http://openoffice.org/2004/office" + xmlns:ooow="http://openoffice.org/2004/writer" + xmlns:oooc="http://openoffice.org/2004/calc" + xmlns:dom="http://www.w3.org/2001/xml-events" + xmlns:xforms="http://www.w3.org/2002/xforms" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + > + <xsl:output omit-xml-declaration = "yes" /> + + <xsl:template match="text:h[@text:style-name='algorithmic-dt']" > + <xsl:copy> + <xsl:apply-templates select="@*" /> + <xsl:apply-templates select="*|text()|comment()" mode="algorithmic"/> + </xsl:copy> +</xsl:template> +<xsl:template match="*|@*|comment()" mode="algorithmic" > + <xsl:copy> + <xsl:apply-templates select="@*" /> + <xsl:apply-templates select="*|text()|comment()" mode="algorithmic"/> + </xsl:copy> +</xsl:template> +<xsl:template match="text()" mode="algorithmic" > + <xsl:value-of select="translate(.,' ',' ')"/> +</xsl:template> + + <xsl:template match="*|@*|text()|comment()" > + <xsl:copy> + <xsl:apply-templates select="*|@*|text()|comment()" /> + </xsl:copy> + </xsl:template> + </xsl:stylesheet> +]]> + +</set> +<xslt name="." xml="." xsl="algorithmic" /> + + </script> + </sax> +</xtpipes> + |