aspose file tools*
The moose likes XML and Related Technologies and the fly likes Valid XML generation situation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Valid XML generation situation" Watch "Valid XML generation situation" New topic
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Valid XML generation situation