From 368da0e4d308b5e9a7756c58f6402bdada911c1a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 3 Apr 2024 11:00:37 +0200 Subject: [PATCH] temporarily revert to known working XHTML export There is an outstanding PR that isn't finished yet to fix some problems with the current state of the XHTML export. https://github.com/oasis-tcs/odf-tc/pull/52 Until time is available to finish and integrate this, revert to a known-working (for ODF) revision 0f01b609d59cb4837827caaf010f184e95eb51b7 --- .../tools/odf2html/export/common/body.xsl | 2 +- .../export/common/styles/style_collector.xsl | 71 +-- .../common/styles/style_mapping_css.xsl | 17 +- .../export/common/table/table_rows.xsl | 5 +- .../export/common/table_of_content.xsl | 25 +- .../tools/odf2html/export/xhtml/body.xsl | 441 +++--------------- .../tools/odf2html/export/xhtml/header.xsl | 7 +- .../odf2html/export/xhtml/opendoc2xhtml.xsl | 5 - .../tools/odf2html/export/xhtml/table.xsl | 6 +- 9 files changed, 82 insertions(+), 497 deletions(-) diff --git a/src/test/resources/odf1.4/tools/odf2html/export/common/body.xsl b/src/test/resources/odf1.4/tools/odf2html/export/common/body.xsl index 8dfb7822..bcad3abd 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/common/body.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/common/body.xsl @@ -81,7 +81,7 @@ - + diff --git a/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_collector.xsl b/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_collector.xsl index bdad6da4..bac0c596 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_collector.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_collector.xsl @@ -504,8 +504,6 @@ - @@ -513,59 +511,9 @@ - - - - - - - transparent - - - - - - - - transparent - - - - - - - - - + - - - - transparent - - - - - - - - - - - transparent - - - - - - - @@ -576,7 +524,7 @@ - + @@ -620,20 +568,21 @@ - all-doc-styles:start + <all-doc-styles> - ***style:start - style:family="" - style:name="" - with properties: + <style + style:family=""> + style:name="" + <* ="" - ***style:end + /> + </style> - all-doc-styles:end + </all-doc-styles> diff --git a/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_mapping_css.xsl b/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_mapping_css.xsl index 56b17331..c81cc9a1 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_mapping_css.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/common/styles/style_mapping_css.xsl @@ -22,18 +22,11 @@ - - - - - background-color:transparent; - - - background-color: - - ; - - + + + background-color: + + ; diff --git a/src/test/resources/odf1.4/tools/odf2html/export/common/table/table_rows.xsl b/src/test/resources/odf1.4/tools/odf2html/export/common/table/table_rows.xsl index 60b47be7..2d6cd728 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/common/table/table_rows.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/common/table/table_rows.xsl @@ -196,10 +196,7 @@ - - - - + diff --git a/src/test/resources/odf1.4/tools/odf2html/export/common/table_of_content.xsl b/src/test/resources/odf1.4/tools/odf2html/export/common/table_of_content.xsl index 0f36b364..7a04bee0 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/common/table_of_content.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/common/table_of_content.xsl @@ -93,10 +93,7 @@ - - - - + @@ -320,10 +317,7 @@ Scenarios unmatched: - - - - + @@ -347,10 +341,7 @@ Scenarios unmatched: - - - - + @@ -367,10 +358,7 @@ Scenarios unmatched: - - - - + @@ -394,10 +382,7 @@ Scenarios unmatched: - - - - + diff --git a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/body.xsl b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/body.xsl index 0b8d03e0..dca74fc2 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/body.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/body.xsl @@ -19,7 +19,7 @@ - + @@ -141,21 +141,15 @@ - - + max-width: - - ; - - - max-height: - + ; @@ -193,7 +187,6 @@ text/javascript @@ -267,20 +260,20 @@ - - - - + + + + - + - + - - - + + + @@ -379,7 +372,7 @@ - + @@ -435,7 +428,7 @@   is an unbreakable whitespace to give content to the element and force a browser not to ignore the element -->
 
- + - + @@ -718,10 +711,7 @@ p - - Next 'div' was a 'text:p'. - - + @@ -831,9 +821,11 @@ + + @@ -859,9 +851,14 @@ cm; - - - + + + + + + @@ -932,11 +929,13 @@ + + @@ -980,6 +979,7 @@ + @@ -1060,6 +1060,14 @@ + + + + + + + + @@ -1093,33 +1101,18 @@ padding:0; - - - - - - - - float:left; position:relative; left: - - cm; - - - top: - - cm; - - - - - position:absolute; left: - - cm; + + + float:left; position:relative; left: + + cm; + + top: - + cm; - - + + @@ -1215,10 +1208,7 @@ NOTE: Should be handled as CSS style in style header --> - - - - + @@ -2036,8 +2026,7 @@ - - + @@ -2092,11 +2081,9 @@ - + - + @@ -2602,6 +2589,7 @@ + @@ -2859,329 +2847,14 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - chart - - - - page - - - - graphic - - - - paragraph - - - - presentation - - - - ruby - - - - section - - - - table - - - - cell - - - - col - - - - row - - - - text - - - WARNING: No style family found for - unknown-family - - + + + - - - - - - - - - - chart - - - - drawing-page - - - - graphic - - - - paragraph - - - - presentation - - - - ruby - - - - section - - - - table - - - - table-cell - - - - table-column - - - - table-row - - - - text - - - WARNING: No style family found for parent element - unknown-family-parent - - - - diff --git a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/header.xsl b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/header.xsl index bdd2d05b..8ee38796 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/header.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/header.xsl @@ -129,12 +129,7 @@ - . - - - - - { } + . { } diff --git a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/opendoc2xhtml.xsl b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/opendoc2xhtml.xsl index b320f9c2..d65831a8 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/opendoc2xhtml.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/opendoc2xhtml.xsl @@ -145,11 +145,6 @@ - - diff --git a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/table.xsl b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/table.xsl index 0788b2bf..8448665d 100644 --- a/src/test/resources/odf1.4/tools/odf2html/export/xhtml/table.xsl +++ b/src/test/resources/odf1.4/tools/odf2html/export/xhtml/table.xsl @@ -206,10 +206,8 @@ - - - - + +