| Author |
Valid XML generation situation
|
Edward Morris
Greenhorn
Joined: Jun 29, 2006
Posts: 18
|
|
My Code ====================================================================================================================================================== SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); URL schemaURL = new URL("http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"); Schema schema = sf.newSchema(schemaURL); //Create instance of DocumentBuilderFactory DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setValidating(true); factory.setSchema(schema); ====================================================================================================================================================== What I'm trying to do ====================================================================================================================================================== Generate XML output that conforms to that schema and is valid ====================================================================================================================================================== The ERROR ====================================================================================================================================================== sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://graphml.graphdrawing.org/xmlns,key.extra.attrib'. ====================================================================================================================================================== The Schema ====================================================================================================================================================== http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd ====================================================================================================================================================== What I need ====================================================================================================================================================== HELP! HELP! HELP! HELP!
|
 |
 |
|
|
subject: Valid XML generation situation
|
|
|