title: StaX's isRepairingNamespaces feature generates a prefix different to 'xml' for the XML namespace
body: <p>I create serialized XML as follows:</p>
  
  <pre><code>XMLOutputFactory factory = XMLOutputFactory.newInstance();
  factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
  
  StringWriter buffer = new StringWriter();
  XMLStreamWriter writer = factory.createXMLStreamWriter(buffer);
  
  writer.writeStartElement("doc");
  writer.writeAttribute(javax.xml.XMLConstants.XML_NS_URI, "base", "/mydoc.xml");
  writer.writeCharacters("Hello world");
  writer.writeEndDocument();
  writer.close();
  
  // buffer now contains:
  // &lt;doc xmlns:zdef101282835="http://www.w3.org/XML/1998/namespace" zdef101282835:base="/mydoc.xml"&gt;Hello world&lt;/doc&gt;
  </code></pre>
  
  <p>So the repairing namespace feature has generated a prefix other than <code>xml</code> for the <code>http://www.w3.org/XML/1998/namespace</code> namespace.</p>
  
  <p>That would be fine by me if it weren't for the errors then returned when re-parsing the document. When I try to parse the resulting document, I get the following exception:</p>
  
  <p><code>org.xml.sax.SAXParseException: The prefix "xml" cannot be bound to any namespace other than its usual namespace; neither can the namespace for "xml" be bound to any prefix other than "xml".</code></p>
  
  <p>Is there a way to configure the <code>XMLOutputFactory</code> to do this correctly?</p>
  
  <p>Just before you tell me to use the <code>writeAttribute</code> method that includes the <code>prefix</code>parameter, I'm channeling SAX events between objects without wanting to know what they are. That's specifically why I want the marshaller to handle namespaces for me... so I don't have to write in a specific case for one given namespace whose prefix is pre-determined. Given that the <code>xml</code> namespace doesn't even have to be defined (and probably shouldn't even be so), it would be an easy exception to write into the <code>IS_REPAIRING_NAMESPACES</code> codebase, wouldn't it?</p>
  
  <p>Thanks for any suggestions.</p>