nokogiri 1.16.8-java → 1.17.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +11 -21
- data/README.md +4 -0
- data/dependencies.yml +6 -6
- data/ext/java/nokogiri/Html4Document.java +3 -3
- data/ext/java/nokogiri/Html4SaxParserContext.java +47 -175
- data/ext/java/nokogiri/NokogiriService.java +2 -2
- data/ext/java/nokogiri/XmlCdata.java +3 -0
- data/ext/java/nokogiri/XmlDocument.java +7 -14
- data/ext/java/nokogiri/XmlDocumentFragment.java +4 -92
- data/ext/java/nokogiri/XmlDtd.java +2 -2
- data/ext/java/nokogiri/XmlEntityReference.java +16 -12
- data/ext/java/nokogiri/XmlNode.java +26 -47
- data/ext/java/nokogiri/XmlNodeSet.java +10 -1
- data/ext/java/nokogiri/XmlSaxParserContext.java +73 -36
- data/ext/java/nokogiri/XmlSchema.java +15 -16
- data/ext/java/nokogiri/XsltStylesheet.java +1 -1
- data/ext/java/nokogiri/internals/NokogiriBlockingQueueInputStream.java +1 -1
- data/ext/java/nokogiri/internals/NokogiriDomParser.java +3 -3
- data/ext/java/nokogiri/internals/NokogiriHandler.java +59 -15
- data/ext/java/nokogiri/internals/NokogiriHelpers.java +1 -1
- data/ext/java/nokogiri/internals/ParserContext.java +51 -21
- data/ext/java/nokogiri/internals/ReaderNode.java +1 -1
- data/ext/java/nokogiri/internals/XmlDomParserContext.java +8 -19
- data/ext/java/nokogiri/internals/c14n/Canonicalizer11.java +1 -1
- data/ext/java/nokogiri/internals/c14n/Canonicalizer20010315Excl.java +1 -1
- data/ext/java/nokogiri/internals/c14n/CanonicalizerBase.java +10 -11
- data/ext/java/nokogiri/internals/c14n/NameSpaceSymbTable.java +5 -5
- data/ext/java/nokogiri/internals/c14n/{UtfHelpper.java → UtfHelper.java} +2 -2
- data/ext/java/nokogiri/internals/dom2dtm/DOM2DTM.java +8 -8
- data/ext/java/nokogiri/internals/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java +2 -2
- data/ext/nokogiri/extconf.rb +191 -137
- data/ext/nokogiri/gumbo.c +69 -53
- data/ext/nokogiri/html4_document.c +10 -4
- data/ext/nokogiri/html4_element_description.c +18 -18
- data/ext/nokogiri/html4_sax_parser.c +40 -0
- data/ext/nokogiri/html4_sax_parser_context.c +48 -58
- data/ext/nokogiri/html4_sax_push_parser.c +25 -24
- data/ext/nokogiri/libxml2_polyfill.c +114 -0
- data/ext/nokogiri/nokogiri.c +9 -2
- data/ext/nokogiri/xml_attr.c +1 -1
- data/ext/nokogiri/xml_cdata.c +2 -10
- data/ext/nokogiri/xml_comment.c +3 -8
- data/ext/nokogiri/xml_document.c +163 -156
- data/ext/nokogiri/xml_document_fragment.c +10 -25
- data/ext/nokogiri/xml_dtd.c +1 -1
- data/ext/nokogiri/xml_element_content.c +9 -9
- data/ext/nokogiri/xml_encoding_handler.c +4 -4
- data/ext/nokogiri/xml_namespace.c +6 -6
- data/ext/nokogiri/xml_node.c +130 -104
- data/ext/nokogiri/xml_node_set.c +46 -44
- data/ext/nokogiri/xml_reader.c +54 -58
- data/ext/nokogiri/xml_relax_ng.c +35 -56
- data/ext/nokogiri/xml_sax_parser.c +156 -88
- data/ext/nokogiri/xml_sax_parser_context.c +213 -131
- data/ext/nokogiri/xml_sax_push_parser.c +68 -49
- data/ext/nokogiri/xml_schema.c +50 -85
- data/ext/nokogiri/xml_syntax_error.c +19 -11
- data/ext/nokogiri/xml_text.c +2 -4
- data/ext/nokogiri/xml_xpath_context.c +2 -2
- data/ext/nokogiri/xslt_stylesheet.c +8 -8
- data/lib/nokogiri/class_resolver.rb +1 -1
- data/lib/nokogiri/css/node.rb +6 -2
- data/lib/nokogiri/css/parser.rb +6 -4
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/parser_extras.rb +6 -66
- data/lib/nokogiri/css/selector_cache.rb +38 -0
- data/lib/nokogiri/css/tokenizer.rb +4 -4
- data/lib/nokogiri/css/tokenizer.rex +9 -8
- data/lib/nokogiri/css/xpath_visitor.rb +42 -6
- data/lib/nokogiri/css.rb +86 -20
- data/lib/nokogiri/decorators/slop.rb +3 -5
- data/lib/nokogiri/encoding_handler.rb +2 -2
- data/lib/nokogiri/html4/document.rb +44 -23
- data/lib/nokogiri/html4/document_fragment.rb +124 -12
- data/lib/nokogiri/html4/encoding_reader.rb +1 -1
- data/lib/nokogiri/html4/sax/parser.rb +23 -38
- data/lib/nokogiri/html4/sax/parser_context.rb +4 -9
- data/lib/nokogiri/html4.rb +9 -14
- data/lib/nokogiri/html5/builder.rb +40 -0
- data/lib/nokogiri/html5/document.rb +61 -30
- data/lib/nokogiri/html5/document_fragment.rb +130 -20
- data/lib/nokogiri/html5/node.rb +4 -4
- data/lib/nokogiri/html5.rb +114 -72
- data/lib/nokogiri/nokogiri.jar +0 -0
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/xml/builder.rb +8 -1
- data/lib/nokogiri/xml/document.rb +70 -26
- data/lib/nokogiri/xml/document_fragment.rb +84 -13
- data/lib/nokogiri/xml/node.rb +82 -11
- data/lib/nokogiri/xml/node_set.rb +9 -7
- data/lib/nokogiri/xml/parse_options.rb +1 -1
- data/lib/nokogiri/xml/pp/node.rb +6 -1
- data/lib/nokogiri/xml/reader.rb +46 -13
- data/lib/nokogiri/xml/relax_ng.rb +57 -20
- data/lib/nokogiri/xml/sax/document.rb +174 -83
- data/lib/nokogiri/xml/sax/parser.rb +115 -41
- data/lib/nokogiri/xml/sax/parser_context.rb +116 -8
- data/lib/nokogiri/xml/sax/push_parser.rb +3 -0
- data/lib/nokogiri/xml/sax.rb +48 -0
- data/lib/nokogiri/xml/schema.rb +112 -45
- data/lib/nokogiri/xml/searchable.rb +6 -8
- data/lib/nokogiri/xml/syntax_error.rb +22 -0
- data/lib/nokogiri/xml.rb +13 -24
- data/lib/nokogiri/xslt.rb +3 -9
- data/lib/xsd/xmlparser/nokogiri.rb +3 -4
- metadata +9 -5
- data/ext/nokogiri/libxml2_backwards_compat.c +0 -121
@@ -63,7 +63,7 @@ public abstract class ParserContext extends RubyObject
|
|
63
63
|
Ruby ruby = context.getRuntime();
|
64
64
|
|
65
65
|
if (!(data.respondsTo("read"))) {
|
66
|
-
throw ruby.newTypeError("
|
66
|
+
throw ruby.newTypeError("argument expected to respond to :read");
|
67
67
|
}
|
68
68
|
|
69
69
|
source.setByteStream(new IOInputStream(data));
|
@@ -80,8 +80,11 @@ public abstract class ParserContext extends RubyObject
|
|
80
80
|
|
81
81
|
Ruby ruby = context.getRuntime();
|
82
82
|
|
83
|
+
if (data.isNil()) {
|
84
|
+
throw ruby.newTypeError("wrong argument type nil (expected String)");
|
85
|
+
}
|
83
86
|
if (!(data instanceof RubyString)) {
|
84
|
-
throw ruby.newTypeError("
|
87
|
+
throw ruby.newTypeError("wrong argument type " + data.getMetaClass() + " (expected String)");
|
85
88
|
}
|
86
89
|
|
87
90
|
RubyString stringData = (RubyString) data;
|
@@ -102,6 +105,33 @@ public abstract class ParserContext extends RubyObject
|
|
102
105
|
source.setEncoding(java_encoding);
|
103
106
|
}
|
104
107
|
|
108
|
+
public void
|
109
|
+
setStringInputSourceNoEnc(ThreadContext context, IRubyObject data, IRubyObject url)
|
110
|
+
{
|
111
|
+
source = new InputSource();
|
112
|
+
ParserContext.setUrl(context, source, url);
|
113
|
+
|
114
|
+
Ruby ruby = context.getRuntime();
|
115
|
+
|
116
|
+
if (data.isNil()) {
|
117
|
+
throw ruby.newTypeError("wrong argument type nil (expected String)");
|
118
|
+
}
|
119
|
+
if (!(data instanceof RubyString)) {
|
120
|
+
throw ruby.newTypeError("wrong argument type " + data.getMetaClass() + " (expected String)");
|
121
|
+
}
|
122
|
+
|
123
|
+
RubyString stringData = (RubyString) data;
|
124
|
+
|
125
|
+
ByteList bytes = stringData.getByteList();
|
126
|
+
|
127
|
+
stringDataSize = bytes.length() - bytes.begin();
|
128
|
+
if (stringDataSize == 0) {
|
129
|
+
throw context.runtime.newRuntimeError("input string cannot be empty");
|
130
|
+
}
|
131
|
+
ByteArrayInputStream stream = new ByteArrayInputStream(bytes.unsafeBytes(), bytes.begin(), bytes.length());
|
132
|
+
source.setByteStream(stream);
|
133
|
+
}
|
134
|
+
|
105
135
|
public static void
|
106
136
|
setUrl(ThreadContext context, InputSource source, IRubyObject url)
|
107
137
|
{
|
@@ -179,23 +209,23 @@ public abstract class ParserContext extends RubyObject
|
|
179
209
|
protected static final long NOCDATA = 16384;
|
180
210
|
protected static final long NOXINCNODE = 32768;
|
181
211
|
|
182
|
-
public
|
183
|
-
public
|
184
|
-
public
|
185
|
-
public
|
186
|
-
public
|
187
|
-
public
|
188
|
-
public
|
189
|
-
public
|
190
|
-
public
|
191
|
-
public
|
192
|
-
public
|
193
|
-
public
|
194
|
-
public
|
195
|
-
public
|
196
|
-
public
|
197
|
-
public
|
198
|
-
public
|
212
|
+
public boolean strict;
|
213
|
+
public boolean recover;
|
214
|
+
public boolean noEnt;
|
215
|
+
public boolean dtdLoad;
|
216
|
+
public boolean dtdAttr;
|
217
|
+
public boolean dtdValid;
|
218
|
+
public boolean noError;
|
219
|
+
public boolean noWarning;
|
220
|
+
public boolean pedantic;
|
221
|
+
public boolean noBlanks;
|
222
|
+
public boolean sax1;
|
223
|
+
public boolean xInclude;
|
224
|
+
public boolean noNet;
|
225
|
+
public boolean noDict;
|
226
|
+
public boolean nsClean;
|
227
|
+
public boolean noCdata;
|
228
|
+
public boolean noXIncNode;
|
199
229
|
|
200
230
|
protected static boolean
|
201
231
|
test(long options, long mask)
|
@@ -227,9 +257,9 @@ public abstract class ParserContext extends RubyObject
|
|
227
257
|
}
|
228
258
|
|
229
259
|
/*
|
230
|
-
public static class
|
260
|
+
public static class NokogiriXIncludeEntityResolver implements org.xml.sax.EntityResolver {
|
231
261
|
InputSource source;
|
232
|
-
public
|
262
|
+
public NokogiriXIncludeEntityResolver(InputSource source) {
|
233
263
|
this.source = source;
|
234
264
|
}
|
235
265
|
|
@@ -91,28 +91,17 @@ public class XmlDomParserContext extends ParserContext
|
|
91
91
|
// Fix for Issue#586. This limits entity expansion up to 100000 and nodes up to 3000.
|
92
92
|
setProperty(SECURITY_MANAGER, new org.apache.xerces.util.SecurityManager());
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
if (options.recover) {
|
99
|
-
setFeature(CONTINUE_AFTER_FATAL_ERROR, true);
|
100
|
-
}
|
94
|
+
setFeature(FEATURE_INCLUDE_IGNORABLE_WHITESPACE, !options.noBlanks);
|
95
|
+
setFeature(CONTINUE_AFTER_FATAL_ERROR, options.recover);
|
96
|
+
setFeature(FEATURE_VALIDATION, options.dtdValid);
|
97
|
+
setFeature(FEATURE_NOT_EXPAND_ENTITY, !options.noEnt);
|
101
98
|
|
102
|
-
if (options.dtdValid) {
|
103
|
-
setFeature(FEATURE_VALIDATION, true);
|
104
|
-
}
|
105
|
-
|
106
|
-
if (!options.noEnt) {
|
107
|
-
setFeature(FEATURE_NOT_EXPAND_ENTITY, true);
|
108
|
-
}
|
109
99
|
// If we turn off loading of external DTDs complete, we don't
|
110
|
-
//
|
100
|
+
// get the publicID. Instead of turning off completely, we use
|
111
101
|
// an entity resolver that returns empty documents.
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
}
|
102
|
+
setFeature(FEATURE_LOAD_EXTERNAL_DTD, options.dtdLoad);
|
103
|
+
setFeature(FEATURE_LOAD_DTD_GRAMMAR, options.dtdLoad);
|
104
|
+
|
116
105
|
parser.setEntityResolver(new NokogiriEntityResolver(runtime, errorHandler, options));
|
117
106
|
}
|
118
107
|
|
@@ -600,7 +600,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase
|
|
600
600
|
// that from the input buffer else if the input buffer consists
|
601
601
|
// only of ".." and if the output buffer does not contain only
|
602
602
|
// the root slash "/", then move the ".." to the output buffer
|
603
|
-
// else
|
603
|
+
// else delete it.; otherwise,
|
604
604
|
} else if (input.equals(".")) {
|
605
605
|
input = "";
|
606
606
|
printStep("2D", output, input);
|
@@ -222,7 +222,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase
|
|
222
222
|
if (!XMLNS_URI.equals(attribute.getNamespaceURI())) {
|
223
223
|
if (isVisible(attribute) && isOutputElement) {
|
224
224
|
// The Element is output element, add the prefix (if used)
|
225
|
-
// to
|
225
|
+
// to visiblyUtilized
|
226
226
|
String prefix = attribute.getPrefix();
|
227
227
|
if (prefix != null && !(prefix.equals(XML) || prefix.equals(XMLNS))) {
|
228
228
|
visiblyUtilized.add(prefix);
|
@@ -28,7 +28,6 @@ import java.util.Iterator;
|
|
28
28
|
import java.util.List;
|
29
29
|
import java.util.ListIterator;
|
30
30
|
import java.util.Map;
|
31
|
-
import java.util.Set;
|
32
31
|
|
33
32
|
import javax.xml.parsers.DocumentBuilder;
|
34
33
|
import javax.xml.parsers.DocumentBuilderFactory;
|
@@ -90,7 +89,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
90
89
|
//private Set<Node> xpathNodeSet;
|
91
90
|
/**
|
92
91
|
* The node to be skipped/excluded from the DOM tree
|
93
|
-
* in subtree
|
92
|
+
* in subtree canonicalization.
|
94
93
|
*/
|
95
94
|
private Node excludeNode;
|
96
95
|
private OutputStream writer = new ByteArrayOutputStream();
|
@@ -243,7 +242,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
243
242
|
ns.outputNodePush();
|
244
243
|
writer.write('<');
|
245
244
|
String name = currentElement.getTagName();
|
246
|
-
|
245
|
+
UtfHelper.writeByte(name, writer, cache);
|
247
246
|
|
248
247
|
Iterator<Attr> attrs = this.handleAttributesSubtree(currentElement, ns);
|
249
248
|
if (attrs != null) {
|
@@ -257,7 +256,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
257
256
|
sibling = currentNode.getFirstChild();
|
258
257
|
if (sibling == null) {
|
259
258
|
writer.write(END_TAG);
|
260
|
-
|
259
|
+
UtfHelper.writeStringToUtf8(name, writer);
|
261
260
|
writer.write('>');
|
262
261
|
//We finished with this level, pop to the previous definitions.
|
263
262
|
ns.outputNodePop();
|
@@ -274,7 +273,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
274
273
|
}
|
275
274
|
while (sibling == null && parentNode != null) {
|
276
275
|
writer.write(END_TAG);
|
277
|
-
|
276
|
+
UtfHelper.writeByte(((Element)parentNode).getTagName(), writer, cache);
|
278
277
|
writer.write('>');
|
279
278
|
//We finished with this level, pop to the previous definitions.
|
280
279
|
ns.outputNodePop();
|
@@ -467,7 +466,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
467
466
|
) throws IOException
|
468
467
|
{
|
469
468
|
writer.write(' ');
|
470
|
-
|
469
|
+
UtfHelper.writeByte(name, writer, cache);
|
471
470
|
writer.write(equalsStr);
|
472
471
|
byte[] toWrite;
|
473
472
|
final int length = value.length();
|
@@ -505,7 +504,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
505
504
|
if (c < 0x80) {
|
506
505
|
writer.write(c);
|
507
506
|
} else {
|
508
|
-
|
507
|
+
UtfHelper.writeCharToUtf8(c, writer);
|
509
508
|
}
|
510
509
|
continue;
|
511
510
|
}
|
@@ -543,7 +542,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
543
542
|
if (c < 0x80) {
|
544
543
|
writer.write(c);
|
545
544
|
} else {
|
546
|
-
|
545
|
+
UtfHelper.writeCharToUtf8(c, writer);
|
547
546
|
}
|
548
547
|
}
|
549
548
|
}
|
@@ -560,7 +559,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
560
559
|
if (c == 0x0D) {
|
561
560
|
writer.write(XD);
|
562
561
|
} else {
|
563
|
-
|
562
|
+
UtfHelper.writeCharToUtf8(c, writer);
|
564
563
|
}
|
565
564
|
}
|
566
565
|
}
|
@@ -599,7 +598,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
599
598
|
if (c < 0x80) {
|
600
599
|
writer.write(c);
|
601
600
|
} else {
|
602
|
-
|
601
|
+
UtfHelper.writeCharToUtf8(c, writer);
|
603
602
|
}
|
604
603
|
}
|
605
604
|
}
|
@@ -649,7 +648,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi
|
|
649
648
|
if (c < 0x80) {
|
650
649
|
writer.write(c);
|
651
650
|
} else {
|
652
|
-
|
651
|
+
UtfHelper.writeCharToUtf8(c, writer);
|
653
652
|
}
|
654
653
|
continue;
|
655
654
|
}
|
@@ -44,7 +44,7 @@ public class NameSpaceSymbTable
|
|
44
44
|
initialMap.put(XMLNS, ne);
|
45
45
|
}
|
46
46
|
|
47
|
-
/**The map
|
47
|
+
/**The map between prefix-> entry table. */
|
48
48
|
private SymbMap symb;
|
49
49
|
|
50
50
|
/**The stacks for removing the definitions when doing pop.*/
|
@@ -52,7 +52,7 @@ public class NameSpaceSymbTable
|
|
52
52
|
private boolean cloned = true;
|
53
53
|
|
54
54
|
/**
|
55
|
-
* Default
|
55
|
+
* Default constructor
|
56
56
|
**/
|
57
57
|
public
|
58
58
|
NameSpaceSymbTable()
|
@@ -173,14 +173,14 @@ public class NameSpaceSymbTable
|
|
173
173
|
symb.put(prefix, entry);
|
174
174
|
entry.rendered = true;
|
175
175
|
entry.lastrendered = entry.uri;
|
176
|
-
// Return the node for
|
176
|
+
// Return the node for outputting.
|
177
177
|
return entry.n;
|
178
178
|
}
|
179
179
|
|
180
180
|
/**
|
181
181
|
* Gets a definition without mark it as render.
|
182
182
|
* For render in exclusive c14n the namespaces in the include prefixes.
|
183
|
-
* @param prefix The prefix whose definition is
|
183
|
+
* @param prefix The prefix whose definition is needed.
|
184
184
|
* @return the attr to render, null if there is no need to render
|
185
185
|
**/
|
186
186
|
public Attr
|
@@ -217,7 +217,7 @@ public class NameSpaceSymbTable
|
|
217
217
|
symb.put(prefix, ne);
|
218
218
|
if (ob != null) {
|
219
219
|
//We have a previous definition store it for the pop.
|
220
|
-
//Check if a previous definition(not the
|
220
|
+
//Check if a previous definition(not the immediate one) has been rendered.
|
221
221
|
ne.lastrendered = ob.lastrendered;
|
222
222
|
if ((ob.lastrendered != null) && (ob.lastrendered.equals(uri))) {
|
223
223
|
//Yes it is. Mark as rendered.
|
@@ -51,7 +51,7 @@ import org.xml.sax.ContentHandler;
|
|
51
51
|
* Note that it doesn't necessarily represent a full Document
|
52
52
|
* tree. You can wrap a DOM2DTM around a specific node and its subtree
|
53
53
|
* and the right things should happen. (I don't _think_ we currently
|
54
|
-
* support
|
54
|
+
* support DocumentFragment nodes as roots, though that might be worth
|
55
55
|
* considering.)
|
56
56
|
*
|
57
57
|
* Note too that we do not currently attempt to track document
|
@@ -63,7 +63,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
|
|
63
63
|
// static final boolean JJK_DEBUG=false;
|
64
64
|
// static final boolean JJK_NEWCODE=true;
|
65
65
|
|
66
|
-
/**
|
66
|
+
/** Manifest constant
|
67
67
|
*/
|
68
68
|
static final String NAMESPACE_DECL_NS = "http://www.w3.org/XML/1998/namespace";
|
69
69
|
|
@@ -330,7 +330,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
|
|
330
330
|
}
|
331
331
|
|
332
332
|
// %REVIEW% Is this local copy Really Useful from a performance
|
333
|
-
// point of view? Or is this a false
|
333
|
+
// point of view? Or is this a false micro-optimization?
|
334
334
|
Node pos = m_pos;
|
335
335
|
Node next = null;
|
336
336
|
int nexttype = NULL;
|
@@ -453,7 +453,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
|
|
453
453
|
// sequence. The lastTextNode value will be set to the last node in the
|
454
454
|
// contiguous sequence, and -- AFTER the DTM addNode -- can be used to
|
455
455
|
// advance next over this whole block. Should be simpler than special-casing
|
456
|
-
// the above loop for "Was the logically-
|
456
|
+
// the above loop for "Was the logically-preceding sibling a text node".
|
457
457
|
//
|
458
458
|
// Finally, a DTM node should be considered a CDATASection only if all the
|
459
459
|
// contiguous text it covers is CDATASections. The first Text should
|
@@ -1188,7 +1188,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
|
|
1188
1188
|
getNodeValue(int nodeHandle)
|
1189
1189
|
{
|
1190
1190
|
// The _type(nodeHandle) call was taking the lion's share of our
|
1191
|
-
// time, and was wrong anyway since it wasn't
|
1191
|
+
// time, and was wrong anyway since it wasn't converting handle to
|
1192
1192
|
// identity. Inlined it.
|
1193
1193
|
int type = _exptype(makeNodeIdentity(nodeHandle));
|
1194
1194
|
type = (NULL != type) ? getNodeType(nodeHandle) : NULL;
|
@@ -1436,7 +1436,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
|
|
1436
1436
|
/** Bind an IncrementalSAXSource to this DTM. NOT RELEVANT for DOM2DTM, since
|
1437
1437
|
* we're wrapped around an existing DOM.
|
1438
1438
|
*
|
1439
|
-
* @param source The IncrementalSAXSource that we want to
|
1439
|
+
* @param source The IncrementalSAXSource that we want to receive events from
|
1440
1440
|
* on demand.
|
1441
1441
|
*/
|
1442
1442
|
public void
|
@@ -1450,7 +1450,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
|
|
1450
1450
|
*
|
1451
1451
|
* @return null if this model doesn't respond to SAX events,
|
1452
1452
|
* "this" if the DTM object has a built-in SAX ContentHandler,
|
1453
|
-
* the
|
1453
|
+
* the IncrementalSAXSource if we're bound to one and should receive
|
1454
1454
|
* the SAX stream via it for incremental build purposes...
|
1455
1455
|
* */
|
1456
1456
|
public org.xml.sax.ContentHandler
|
@@ -1462,7 +1462,7 @@ public class DOM2DTM extends DTMDefaultBaseIterators
|
|
1462
1462
|
/**
|
1463
1463
|
* Return this DTM's lexical handler.
|
1464
1464
|
*
|
1465
|
-
* %REVIEW% Should this return null if
|
1465
|
+
* %REVIEW% Should this return null if construction already done/begun?
|
1466
1466
|
*
|
1467
1467
|
* @return null if this model doesn't respond to lexical SAX events,
|
1468
1468
|
* "this" if the DTM object has a built-in SAX ContentHandler,
|
@@ -573,7 +573,7 @@ public class DOM2DTMdefaultNamespaceDeclarationNode implements Attr, TypeInfo
|
|
573
573
|
* <code>Node</code> references returned by the implementation reference
|
574
574
|
* the same object. When two <code>Node</code> references are references
|
575
575
|
* to the same object, even if through a proxy, the references may be
|
576
|
-
* used completely
|
576
|
+
* used completely interchangeably, such that all attributes have the
|
577
577
|
* same values and calling the same DOM method on either reference
|
578
578
|
* always has exactly the same effect.
|
579
579
|
* @param other The node to test against.
|
@@ -688,7 +688,7 @@ public class DOM2DTMdefaultNamespaceDeclarationNode implements Attr, TypeInfo
|
|
688
688
|
public String
|
689
689
|
getTextContent() throws DOMException
|
690
690
|
{
|
691
|
-
return getNodeValue(); //
|
691
|
+
return getNodeValue(); // overridden in some subclasses
|
692
692
|
}
|
693
693
|
|
694
694
|
/**
|