From 8b019b468f8c4885ab7da4ad104ab16bee0e1b49 Mon Sep 17 00:00:00 2001 From: Steve Ball Date: Wed, 9 Jan 2008 20:48:30 +0000 Subject: [PATCH] Fixed bug in WordML table handling, improved table handling for Pages 08, synchronised WordML and Pages templates. --- xsl/roundtrip/blocks2dbk.xsl | 20 ++-- xsl/roundtrip/dbk2pages.xsl | 15 ++- xsl/roundtrip/dbk2wp.xsl | 2 + xsl/roundtrip/normalise-common.xsl | 4 + xsl/roundtrip/pages2normalise.xsl | 186 ++++++++++++++++++++--------- xsl/roundtrip/template-pages.xml | 2 +- xsl/roundtrip/template.xml | 2 +- 7 files changed, 158 insertions(+), 73 deletions(-) diff --git a/xsl/roundtrip/blocks2dbk.xsl b/xsl/roundtrip/blocks2dbk.xsl index 0936a0ee7..eedbc40f7 100644 --- a/xsl/roundtrip/blocks2dbk.xsl +++ b/xsl/roundtrip/blocks2dbk.xsl @@ -68,7 +68,7 @@ + select='following-sibling::dbk:para[@rnd:style = "caption"]'/> @@ -93,7 +93,7 @@ @rnd:style = "figure-title" and following-sibling::*[1][self::dbk:para][dbk:inlinemediaobject and count(*) = 1 and normalize-space(.) = ""]'/> @@ -387,14 +387,14 @@ - - - + bad-caption caption does not follow table or figure @@ -522,7 +522,7 @@ select='ancestor::dbk:para/following-sibling::*[self::dbk:informaltable or self::dbk:para[dbk:inlinemediaobject and count(*) = 1 and normalize-space() = ""]][1]'/> + select='ancestor::dbk:para/following-sibling::dbk:para[@rnd:style = "caption"]'/> - + @@ -1151,7 +1151,7 @@ - + @@ -1173,7 +1173,7 @@ + select='following-sibling::dbk:para[@rnd:style = "caption"][1]'/> @@ -1188,7 +1188,7 @@ + select='following-sibling::dbk:para[@rnd:style = "caption"][1]'/> - - unable to find paragraph style "" + + + para + + + + + + + + unable to find paragraph style "" - + diff --git a/xsl/roundtrip/dbk2wp.xsl b/xsl/roundtrip/dbk2wp.xsl index e8b333df9..e7fd80b96 100644 --- a/xsl/roundtrip/dbk2wp.xsl +++ b/xsl/roundtrip/dbk2wp.xsl @@ -936,6 +936,8 @@ + + diff --git a/xsl/roundtrip/normalise-common.xsl b/xsl/roundtrip/normalise-common.xsl index a58989a31..83a16b37c 100644 --- a/xsl/roundtrip/normalise-common.xsl +++ b/xsl/roundtrip/normalise-common.xsl @@ -22,6 +22,10 @@ + + + caption + diff --git a/xsl/roundtrip/pages2normalise.xsl b/xsl/roundtrip/pages2normalise.xsl index 4f4a7962a..e8ea078a8 100644 --- a/xsl/roundtrip/pages2normalise.xsl +++ b/xsl/roundtrip/pages2normalise.xsl @@ -45,7 +45,7 @@ + count(*) = count(sf:attachment-ref|sf:br|sf:selection-start|sf:selection-end)'> @@ -140,93 +140,163 @@ - + - - - - - - - - + + + + + + + + + + - cannot determine num-rows - cannot determine num-rows + cannot determine number of rows in table + cannot determine number of rows in table + + + cannot determine number of columns in table + cannot determine number of columns in table - + + + all + + + topbot + + + sides + + + top + + + bottom + + - - - + + + + + + + + + - + + + + + + + + + + + + + + - - - - - - - - - - - - + + - - - - - - - - - - - - - - - + + + + - + + WARNING: insufficient table cells + WARNING: insufficient table cells (num-rows , row ) + + + WARNING: excess table cells + WARNING: excess table cells (num-rows , row ) + + + + - + - - - + + + + - + - + + + + 1 + + + + + 1 + + + + + + + + + + + +