[jdom-interest] XSL

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Jul 26 06:41:36 PDT 2000


At 3:57 PM -0700 7/25/00, Eddy, Joel wrote:

for those not understanding this ... i get the following error when i 
try to create an document with the root "xsl:stylesheet"  it seems to 
choke on the colon...

The name "xsl:stylesheet" is not legal for JDOM/XML elements: : is 
not allowed in XML names.. org.jdom.IllegalNameException: The name 
"xsl:stylesheet" is not legal for JDOM/XML elements: : is not allowed 
in XML names..

You need to create a Namespace object for the xsl namespace. For example,

Element e = new Element("stylesheet", "xsl", "http://www.w3.org/TR/1999/XSLT");

We should clean up the error message to make this more obvious.


+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list