File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
ext/java/nokogiri/internals Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,7 @@ public class HtmlDomParserContext extends XmlDomParserContext
56
56
initParser (Ruby runtime )
57
57
{
58
58
XMLParserConfiguration config = new HTMLConfiguration ();
59
- //XMLDocumentFilter removeNSAttrsFilter = new RemoveNSAttrsFilter();
60
59
XMLDocumentFilter elementValidityCheckFilter = new ElementValidityCheckFilter (errorHandler );
61
- //XMLDocumentFilter[] filters = { removeNSAttrsFilter, elementValidityCheckFilter};
62
60
XMLDocumentFilter [] filters = { elementValidityCheckFilter };
63
61
64
62
config .setErrorHandler (this .errorHandler );
@@ -162,29 +160,6 @@ public class HtmlDomParserContext extends XmlDomParserContext
162
160
return null ;
163
161
}
164
162
165
- /**
166
- * Filter to strip out attributes that pertain to XML namespaces.
167
- */
168
- public static class RemoveNSAttrsFilter extends DefaultFilter
169
- {
170
- @ Override
171
- public void
172
- startElement (QName element , XMLAttributes attrs ,
173
- Augmentations augs ) throws XNIException
174
- {
175
- int i ;
176
- for (i = 0 ; i < attrs .getLength (); ++i ) {
177
- if (isNamespace (attrs .getQName (i ))) {
178
- attrs .removeAttributeAt (i );
179
- --i ;
180
- }
181
- }
182
-
183
- element .uri = null ;
184
- super .startElement (element , attrs , augs );
185
- }
186
- }
187
-
188
163
public static class ElementValidityCheckFilter extends DefaultFilter
189
164
{
190
165
private NokogiriErrorHandler errorHandler ;
You can’t perform that action at this time.
0 commit comments