Re: Add namespaces declaration to parent element.

2009-08-20 Thread juho
Again, I thought actually the functionnality of parser for Jaxp Validator doesn't work for Element, I try it for document validation but it works, but not for elements. https://issues.apache.org/jira/browse/XERCESJ-1387 https://issues.apache.org/jira/browse/XERCESJ-1387 But i think i misundes

Re: Add namespaces declaration to parent element.

2009-08-20 Thread Michael Glavassevich
juho wrote on 08/20/2009 09:43:32 AM: > Hello and thanks it works perfectly. > > I have just an understanding question; > I began with difficulty to understand how to use different DOM Level, but > correct me if misunderstood but Level3 is the most complete actually? It's the most recent version

Re: Add namespaces declaration to parent element.

2009-08-20 Thread juho
Hello and thanks it works perfectly. I have just an understanding question; I began with difficulty to understand how to use different DOM Level, but correct me if misunderstood but Level3 is the most complete actually? I think for me it was the best way to realize what i need. Because it permits

Re: Add namespaces declaration to parent element.

2009-08-20 Thread Michael Glavassevich
Hello, The value of the 2nd parameter of setAttributeNS() [1] is supposed to be a qualified named and needs to start with "xmlns:" or be "xmlns" for a namespace declaration. Try: parent.setAttributeNS (XMLConstants.XMLNS_ATTRIBUTE_NS_URI,"xmlns:"+prefix,desc.getNamespaceURI ()); instead of: pa

Re: Add namespaces declaration to parent element.

2009-08-20 Thread juho
Hi, It isn't for transformation because i need to create a Xml from an XSD and not parse an existant one. I use Xerces-J because it permits to validate dynamicly. I have an Jtree (Java swing) which represents the DOM document. For each add modify or remove from TreeEditor i validate Dom and DOM

Re: Add namespaces declaration to parent element.

2009-08-20 Thread Mukul Gandhi
do you already have the old XML format, and only transformation is required, to the new format? if yes, I would try to do this with XSLT. if you are creating the new XML, as part of some program, where use of Xerces-J is mandatory, then we must find way to solve this problem with Xerces-J and an A