Commit 8810b62c authored by Wendell Piez's avatar Wendell Piez

Now underlining is a no-op unless a "value" (underline style) is specified...

Now underlining is a no-op unless a "value" (underline style) is specified with it (matching behavior in Word)
parent e4ccefb9
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
<!-- Output: Spammy HTML, pretty cruddy, expect to perform cleanup ... --> <!-- Output: Spammy HTML, pretty cruddy, expect to perform cleanup ... -->
<!-- For docs on WordML, see (at least): <!-- For docs on WordML, see (at least):
http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/index.html http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/index.html
--> -->
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<!-- Run on 'document.xml' inside a .docx --> <!-- Run on 'document.xml' inside a .docx -->
<!-- Note that unprefixed elements are in namespace http://www.w3.org/1999/xhtml --> <!-- Note that unprefixed elements are in namespace http://www.w3.org/1999/xhtml -->
<xsl:template match="/w:document"> <xsl:template match="/w:document">
...@@ -227,11 +227,8 @@ ...@@ -227,11 +227,8 @@
</tr> </tr>
</xsl:template> </xsl:template>
<!--<xsl:template match="w:tc"> <!-- more table handling in module docx-table-extract.xsl -->
<td>
<xsl:apply-templates select="w:p"/>
</td>
</xsl:template>-->
<!-- Drop in default traversal --> <!-- Drop in default traversal -->
<xsl:template match="w:pPr"/> <xsl:template match="w:pPr"/>
...@@ -620,12 +617,9 @@ ...@@ -620,12 +617,9 @@
<xsl:template mode="set-property" match="w:i[@w:val=('0','none')]">normal</xsl:template> <xsl:template mode="set-property" match="w:i[@w:val=('0','none')]">normal</xsl:template>
<xsl:template mode="set-property" match="w:i">italic</xsl:template> <xsl:template mode="set-property" match="w:i">italic</xsl:template>
<!-- will become 'i' --> <!-- Inoperable when no value is given -->
<!--<xsl:template mode="build-properties" as="element(xsw:prop)" match="w:style//w:i[not(@val=('0','none'))]"> <xsl:template mode="build-properties" as="element(xsw:prop)?" match="w:style//w:u[empty(@w:val)]" priority="2"/>
<xsw:prop name="font-style">italic</xsw:prop> <xsl:template mode="build-properties" as="element(xsw:prop)" match="w:style//w:u">
</xsl:template>-->
<xsl:template mode="build-properties" as="element(xsw:prop)" match="w:style//w:u">
<xsw:prop name="text-decoration"> <xsw:prop name="text-decoration">
<xsl:apply-templates mode="set-property" select="."/> <xsl:apply-templates mode="set-property" select="."/>
</xsw:prop> </xsw:prop>
...@@ -634,11 +628,6 @@ ...@@ -634,11 +628,6 @@
<xsl:template mode="set-property" match="w:u[@w:val=('0','none')]">none</xsl:template> <xsl:template mode="set-property" match="w:u[@w:val=('0','none')]">none</xsl:template>
<xsl:template mode="set-property" match="w:u">underline</xsl:template> <xsl:template mode="set-property" match="w:u">underline</xsl:template>
<!-- will become 'u' -->
<!--<xsl:template mode="build-properties" as="element(xsw:prop)" match="w:style//w:u[not(@val=('0','none'))]">
<xsw:prop name="text-decoration">underline</xsw:prop>
</xsl:template>-->
<xsl:template mode="build-properties" as="element(xsw:prop)*" match="w:szCs[. = (../w:sz)]"/> <xsl:template mode="build-properties" as="element(xsw:prop)*" match="w:szCs[. = (../w:sz)]"/>
<!-- Font size for complex scripts (szCs) is just noise. --> <!-- Font size for complex scripts (szCs) is just noise. -->
......
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