[jdom-interest] XSL

Harry Evans hevans at elite.com
Wed Jul 26 12:52:42 PDT 2000


Namespace ns = Namespace.get("xsl", " http://www.w3.org/TR/1999/XSLT
<http://www.w3.org/TR/1999/XSLT> ");
Element e1 = new Element("template", ns);
Element e2 = new Element("item1", ns);
e1.addChild(e2);
<etc... />
 
The interface for creating Elements is fully specified in the Javadoc for
the class.  Try that first.
 
Harry Evans

-----Original Message-----
From: Eddy, Joel [mailto:joel.eddy at medinex.com]
Sent: Wednesday, July 26, 2000 8:45 AM
To: 'Elliotte Rusty Harold'; 'jdom-interest at jdom.org'
Subject: RE: [jdom-interest] XSL



how would i go about building up other elements for the xsl doc? 

Element e = new Element("template", "xsl"); 

i tried that thinking it might work.. im not sure i understand the
parameters being passed to the Element object 

-----Original Message----- 
From: Elliotte Rusty Harold [ mailto:elharo at metalab.unc.edu
<mailto:elharo at metalab.unc.edu> ] 
Sent: Wednesday, July 26, 2000 6:42 AM 
To: Eddy, Joel; 'jdom-interest at jdom.org' 
Subject: Re: [jdom-interest] XSL 


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 <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://metalab.unc.edu/xml/books/bible/>                | 
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/
<http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/>    | 
+----------------------------------+---------------------------------+ 
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/
<http://metalab.unc.edu/javafaq/>  | 
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/
<http://metalab.unc.edu/xml/>      | 
+----------------------------------+---------------------------------+ 
_______________________________________________ 
To control your jdom-interest membership: 
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
<http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourho
st.com>  




More information about the jdom-interest mailing list