Index: SAXBuilder.java =================================================================== RCS file: /home/cvspublic/jdom/src/java/org/jdom/input/SAXBuilder.java,v retrieving revision 1.56 diff -r1.56 SAXBuilder.java 127a128,130 > /** User-specified properties to be set on the SAX parser */ > private HashMap properties = new HashMap(5); > 292a296,317 > * This sets a property on the SAX parser. See the SAX documentation for > * more information. > *
> *> * NOTE: SAXBuilder requires that some particular properties of the SAX parser be > * set up in certain ways for it to work properly. The list of such properties > * may change in the future. Therefore, the use of this method may cause > * parsing to break, and even if it doesn't break anything today it might > * break parsing in a future JDOM version, because what JDOM parsers require > * may change over time. Use with caution. > *
> * > * @param name The property name, which is a fully-qualified URI. > * @param value The requested value for the property. > */ > public void setProperty(String name, Object value) { > // Save the specified property for later. > properties.put(name, value); > } > > /** > *492a518,519 > } > 500a528,533 > // Set any user-specified properties on the parser. > Iterator iter2 = properties.keySet().iterator(); > while(iter2.hasNext()) { > String name = (String)iter2.next(); > Object value = properties.get(name); > internalSetProperty(parser, name, value, name); 602c635 < displayName + " not supported for SAX driver " + saxDriverClass); --- > displayName + " feature not supported for SAX driver " + saxDriverClass); 605a639,657 > } > } > > /** > *
> * Tries to set a property on the parser. If the property cannot be set, > * throws a JDOMException describing the problem. > *
> */ > private void internalSetProperty(XMLReader parser, String property, > Object value, String displayName) throws JDOMException { > try { > parser.setProperty(property, value); > } catch (SAXNotSupportedException e) { > throw new JDOMException( > displayName + " property not supported for SAX driver " + saxDriverClass); > } catch (SAXNotRecognizedException e) { > throw new JDOMException( > displayName + " property not recognized for SAX driver " + saxDriverClass);