Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Valid XML generation situation

 
Edward Morris
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic