[jdom-interest] xml:lang Attribute problem

Lorenzo Gonzalez lgonzalez at gltg.com
Thu Sep 28 07:10:20 PDT 2000


Is the following line verbatim from your code?  Take another look at it...

t_xml.append("</Foo");

- Lorenzo


-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Perry Hoekstra
Sent: Wednesday, October 11, 2000 8:00 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] xml:lang Attribute problem


Greet the sun all:

I don't if this is how I implemented it or a bug but when I execute the
following code:

StringBuffer t_xml = new StringBuffer("<?xml version = \"1.0\"?>");

t_xml.append("<Foo xml:lang=\"en-US\">  ");
t_xml.append("</Foo");

org.jdom.input.SAXBuilder t_saxBuilder = new
org.jdom.input.SAXBuilder("org.apache.xerces.parsers.SAXParser");

org.jdom.Document t_jdomDocument = t_saxBuilder.build(new
java.io.StringReader(t_xml.toString()));

I receive the following exception:

org.jdom.JDOMException: The name "" is not legal for JDOM/XML
namespaces: Namespace URIs must be non-null and non-empty Strings..)

Now, looking at page 297 of the XML Bible, it states that xml:lang is a
valid attribute.  I refresh my code with a fresh extract through CVS
this morning. Ideas on what I am doing wrong?

--
Perry Hoekstra
E-Commerce Architect
Talent Software Services
dutchman at mn.uswest.net
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com




More information about the jdom-interest mailing list