missing baseURI in output

Larry Levin <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
Hi:
I've been using JDom for quite some time with no probelems but just hit 
a snag when trying to create an OWL ontology using it. This issue is 
that while I set a baseURI for the document, it isnt showing up when the 
document is written using the XMLOutputer. The code is as follows:

      Namespace rdfsNs = Namespace.getNamespace("rdfs", 
"http://www.w3.org/2000/01/rdf-schema#");             Element root = new 
Element("RDF", rdfNs);
            :
          { add various namespaces to root }
            :
       Document doc = new Document(root);
       doc.setBaseURI("http://foo.bar/owlTest");

After building the document, I write it as follows:

       Format myFormat = Format.getPrettyFormat();
       XMLOutputter outputter = new XMLOutputter(myFormat);
       FileOutputStream fo =  new FileOutputStream(fileName);
       outputter.output(doc, fo);
       fo.flush();
       fo.close();

The  problem is that the xml base decalaration 
xml:base="http://foo.bar/owlTest" must explicitly appear in the output 
but doesnt. Any help would be greatly appreciated.
  Thanks
   Larry Levin
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.