From: Norman Walsh Date: Sun, 15 Jul 2001 20:07:49 +0000 (+0000) Subject: New Xalan code sometimes (always?) returns DOCUMENT_NODE where DOCUMENT_FRAGMENT_NODE... X-Git-Tag: release/1.79.1~6^2~6391 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46c7fca1c1ec762154c077d66a32a2e10d17c560;p=docbook-dsssl New Xalan code sometimes (always?) returns DOCUMENT_NODE where DOCUMENT_FRAGMENT_NODE used to be returned: handle it --- diff --git a/xsl/extensions/xalan2/com/nwalsh/xalan/Verbatim.java b/xsl/extensions/xalan2/com/nwalsh/xalan/Verbatim.java index a5986a11f..43425d5ba 100644 --- a/xsl/extensions/xalan2/com/nwalsh/xalan/Verbatim.java +++ b/xsl/extensions/xalan2/com/nwalsh/xalan/Verbatim.java @@ -206,6 +206,7 @@ public class Verbatim { int numLines = 0; if (node.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE + || node.getNodeType() == Node.DOCUMENT_NODE || node.getNodeType() == Node.ELEMENT_NODE) { Node child = node.getFirstChild(); while (child != null) { @@ -248,7 +249,8 @@ public class Verbatim { private void lineNumberFragment(DOMBuilder rtf, Node node) { try { - if (node.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) { + if (node.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE + || node.getNodeType() == Node.DOCUMENT_NODE) { Node child = node.getFirstChild(); while (child != null) { lineNumberFragment(rtf, child); @@ -442,7 +444,6 @@ public class Verbatim { public DocumentFragment insertCallouts (ExpressionContext context, NodeIterator areaspecNodeSet, NodeIterator xalanNI) { - String type = Params.getString(context, "stylesheet.result.type"); boolean useFO = type.equals("fo"); int defaultColumn = Params.getInt(context, "callout.defaultcolumn"); @@ -602,7 +603,8 @@ public class Verbatim { Node node, FormatCallout fCallout) { try { - if (node.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) { + if (node.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE + || node.getNodeType() == Node.DOCUMENT_NODE) { Node child = node.getFirstChild(); while (child != null) { calloutFragment(rtf, child, fCallout);