From 77e67a8307c462ea3c5aaa6004aba3b315da98d0 Mon Sep 17 00:00:00 2001 From: Mauritz Jeanson Date: Mon, 13 Jul 2009 20:33:56 +0000 Subject: [PATCH] Added fixes so that colgroups in the XHTML namespace are processed properly. --- xsl-saxon/src/com/nwalsh/saxon/ColumnScanEmitter.java | 7 +++++-- xsl-saxon/src/com/nwalsh/saxon/ColumnUpdateEmitter.java | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/xsl-saxon/src/com/nwalsh/saxon/ColumnScanEmitter.java b/xsl-saxon/src/com/nwalsh/saxon/ColumnScanEmitter.java index b399f4dd0..30bc34d51 100644 --- a/xsl-saxon/src/com/nwalsh/saxon/ColumnScanEmitter.java +++ b/xsl-saxon/src/com/nwalsh/saxon/ColumnScanEmitter.java @@ -41,6 +41,8 @@ public class ColumnScanEmitter extends com.icl.saxon.output.Emitter { /** The FO namespace name. */ protected static String foURI = "http://www.w3.org/1999/XSL/Format"; + /** The XHTML namespace name. */ + protected static String xhtmlURI = "http://www.w3.org/1999/xhtml"; /** Construct a new ColumnScanEmitter. */ public ColumnScanEmitter(NamePool namePool) { @@ -135,10 +137,11 @@ public class ColumnScanEmitter extends com.icl.saxon.output.Emitter { int thisFingerprint = namePool.getFingerprint(nameCode); int colFingerprint = namePool.getFingerprint("", "col"); + int XHTMLcolFingerprint = namePool.getFingerprint(xhtmlURI, "col"); int foColFingerprint = namePool.getFingerprint(foURI, "table-column"); if (thisFingerprint == colFingerprint - || thisFingerprint == foColFingerprint) { + || thisFingerprint == foColFingerprint || thisFingerprint == XHTMLcolFingerprint) { if (numColumns >= width.length) { String newWidth[] = new String[width.length+10]; for (int count = 0; count < width.length; count++) { @@ -147,7 +150,7 @@ public class ColumnScanEmitter extends com.icl.saxon.output.Emitter { width = newWidth; } - if (thisFingerprint == colFingerprint) { + if (thisFingerprint == colFingerprint || thisFingerprint == XHTMLcolFingerprint) { if (attributes.getValue("width") == null) { width[numColumns++] = "1*"; } else { diff --git a/xsl-saxon/src/com/nwalsh/saxon/ColumnUpdateEmitter.java b/xsl-saxon/src/com/nwalsh/saxon/ColumnUpdateEmitter.java index 33ee9b2c2..d41038c43 100644 --- a/xsl-saxon/src/com/nwalsh/saxon/ColumnUpdateEmitter.java +++ b/xsl-saxon/src/com/nwalsh/saxon/ColumnUpdateEmitter.java @@ -44,6 +44,8 @@ public class ColumnUpdateEmitter extends CopyEmitter { /** The FO namespace name. */ protected static String foURI = "http://www.w3.org/1999/XSL/Format"; + /** The XHTML namespace name. */ + protected static String xhtmlURI = "http://www.w3.org/1999/xhtml"; /** Construct a new ColumnUpdateEmitter. */ public ColumnUpdateEmitter(Controller controller, @@ -63,9 +65,10 @@ public class ColumnUpdateEmitter extends CopyEmitter { int thisFingerprint = namePool.getFingerprint(nameCode); int colFingerprint = namePool.getFingerprint("", "col"); + int XHTMLcolFingerprint = namePool.getFingerprint(xhtmlURI, "col"); int foColFingerprint = namePool.getFingerprint(foURI, "table-column"); - if (thisFingerprint == colFingerprint) { + if (thisFingerprint == colFingerprint || thisFingerprint == XHTMLcolFingerprint ) { AttributeCollection attr = new AttributeCollection(namePool, attributes); int widthFingerprint = namePool.getFingerprint("", "width"); -- 2.40.0