Hi, When using the Xalan serializer bundled with Xerces 2.9.1 I get a fatal error whenever an attribute value contains '<' (left angle bracket):
> The value of attribute "bar" associated with an element type "foo" > must not contain the '<' character. I believe this is a bug since if I instead use the now deprecated native serializer of Xerces, I don't get the error. Also, the the "DOM Level 3 Core" specification under "setAttributeNS" says this: > So any markup (such as syntax to be recognized as an entity > reference) is treated as literal text, and needs to be appropriately > escaped by the implementation when it is written out. Here is my code: > DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); > > DOMImplementation core = > (DOMImplementation)registry.getDOMImplementation("Core 3.0"); > Document document = core.createDocument(null, "foo", null); > document.getDocumentElement().setAttributeNS(null, "bar", "<"); > > DOMImplementationLS ls = > (DOMImplementationLS)registry.getDOMImplementation("LS 3.0"); > LSSerializer serializer = ls.createLSSerializer(); > serializer.getDomConfig().setParameter("error-handler", new DOMErrorHandler() > { > public boolean handleError(DOMError e) > { > System.err.println("Error: "+e.getMessage()); > return false; > } > }); > serializer.writeToString(document); Please let me know if this is required behaviour rather than a bug. Regards, Kristian Spangsege --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]