[jdom-interest] xml:lang and compilation problems

Kjetil Larsen kjetil at cs.stanford.edu
Sun Sep 10 17:02:31 PDT 2000


Hi,

I'm using the having problem using SAXBuilder with the Xerces to parse
xml documents with
attributes such as xml:lang. I read the FAQ threads on the issue (Stacie
Clark, Jason Hunter)
and gathered I needed the latest CVS build. This didn't solve the
problem, however. I'm still
getting:
org.xml.sax.SAXException: The name "xml" is not legal for JDOM/XML
Namespace pre
fixs: Namespace prefixes cannot begin with "xml" in any combination of
case.
        at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:878)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:302)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:373)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
        at ReceiveRequest.read(ReceiveRequest.java:104)
        at ReceiveRequest.main(ReceiveRequest.java:77)

Is anybody aware of a work around?
(FYI: I am still using the deprecated addChild(org.jdom.Element) and
getContent() methods )

I also have problems compiling. For the milestone builds (beta 3 and 4)
I got:
    [javac] C:\java\jdom\build\src\org\jdom\input\DOMBuilder.java:416:
             Method getPublicId() not found in interface
org.w3c.dom.DocumentType.
    [javac]                 String publicID = domDocType.getPublicId();
    [javac] C:\java\jdom\build\src\org\jdom\input\DOMBuilder.java:417:
            Method getSystemId() not found in interface
org.w3c.dom.DocumentType.
    [javac]                 String systemID = domDocType.getSystemId();

With the latest CSV build, I also get:
    [javac]
C:\java\jdom\build\src\org\jdom\output\DOMOutputter.java:263:
        Method createAttributeNS(java.lang.String, java.lang.String) not
found in interface or
g.w3c.dom.Document.
    [javac]              domAttr =
domDoc.createAttributeNS(attribute.getNamespaceURI(),

Has anybody else encountered this ?

thanks,

        Kjetil

--
Kjetil Larsen
mailto:kjetil at cs.stanford.edu
Tel: +31 (0)621 590666





More information about the jdom-interest mailing list