Project

Profile

Help

Revision 55223d0e

Added by Michael Kay almost 13 years ago

Fix bug 2635117 (-expand:off doesn't work)

View differences:

latest9.1/bj/net/sf/saxon/event/ReceivingContentHandler.java
294 294
                    continue;
295 295
                }
296 296
                // TODO: JDK15: eliminate use of reflection for Attributes2.isSpecified()
297
                if (suppressDTDAttributeDefaults && attributes2class == null) {
298
                    try {
299
                        attributes2class = getConfiguration().getClass("org.xml.sax.ext.Attributes2", false, null);
300
                        //noinspection RedundantArrayCreation
301
                        isSpecifiedMethod = attributes2class.getMethod("isSpecified", new Class[]{String.class});
302
                    } catch (XPathException e) {
303
                        suppressDTDAttributeDefaults = false;
304
                        attributes2class = null;
305
                    } catch (NoSuchMethodException e) {
306
                        suppressDTDAttributeDefaults = false;
307
                        attributes2class = null;
297
                if (suppressDTDAttributeDefaults) {
298
                    if (attributes2class == null) {
299
                        try {
300
                            attributes2class = getConfiguration().getClass("org.xml.sax.ext.Attributes2", false, null);
301
                            //noinspection RedundantArrayCreation
302
                            isSpecifiedMethod = attributes2class.getMethod("isSpecified", new Class[]{String.class});
303
                        } catch (XPathException e) {
304
                            suppressDTDAttributeDefaults = false;
305
                            attributes2class = null;
306
                        } catch (NoSuchMethodException e) {
307
                            suppressDTDAttributeDefaults = false;
308
                            attributes2class = null;
309
                        }
308 310
                    }
309 311

  
310 312
                    if (suppressDTDAttributeDefaults) {

Also available in: Unified diff