<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Request for help using JDOM Beta 6 to create namespace declaration</TITLE>
<META content="MSHTML 5.00.3211.1700" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=874545418-11052001>Since
you didn't include your code, I can't say for sure without thinking real hard
anyway. However, my guess is that you want to create the element and then
use addAdditionalNamespace() since the root element is not actually in the
namespace declared in your document.</SPAN></FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Henry Charlton
[mailto:henryc@nortelnetworks.com]<BR><B>Sent:</B> Friday, May 11, 2001 10:29
AM<BR><B>To:</B> 'jdom-interest@jdom.org'<BR><B>Subject:</B> [jdom-interest]
Request for help using JDOM Beta 6 to create namespace declaratio
n<BR><BR></DIV></FONT>
<P><FONT face=Arial size=2>I am working to create an XML document that is
compliant with a published standard, and am having difficulty using JDOM to
generate the desired declaration.</FONT></P>
<P><FONT face=Arial size=2>This is the desired output, based on the standards
document</FONT> <FONT face=Arial size=1>(3GPP TS 32.104 V3.3.0 (2000-09)
)</FONT> <FONT face=Arial size=2>I need to be compliant with:</FONT></P>
<P><FONT face=Arial size=2><!DOCTYPE mdc SYSTEM
"MeasDataCollection.dtd"></FONT> <BR><FONT face=Arial size=2><mdc
xmlns:HTML="<A href="http://www.w3.org/TR/REC-xml"
target=_blank>http://www.w3.org/TR/REC-xml</A>"></FONT> <BR><FONT
face=Arial size=2></mdc></FONT> </P>
<P><FONT face=Arial size=2>This is the dtd:</FONT> <BR><FONT face=Arial
size=2><!-- MeasDataCollection.dtd version
1.1--> </FONT><BR><FONT face=Arial
size=2><!ELEMENT mdc (mfh, md*, mff)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT mfh (ffv, sn, st, vn, cbt)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT md (neid, mi*)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT neid (neun, nedn)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT mi (mts, gp, mt*, mv*)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT mv (moid, r*, sf?)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT mff (ts)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT ts (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT sf (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT r (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT mt (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT moid (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT gp (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT mts (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT nedn (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT neun (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT cbt (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT vn (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT st (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT sn (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!ELEMENT ffv (#PCDATA)></FONT> <BR><FONT face=Arial
size=2><!-- end of MeasDataCollection.dtd --></FONT> </P>
<P><FONT face=Arial size=2>The output I have been able to achieve using
the ctor</FONT> <FONT face="Courier New" size=2>public<B>
Element</B>(java.lang.String name,<U> </U></FONT><U><FONT color=#0000ff
face="Courier New" size=2>Namespace</FONT></U><FONT color=#0000ff
face="Courier New" size=2></FONT> <FONT face="Courier New" size=2>namespace)
is:</FONT> </P>
<P><FONT face="Courier New" size=2><!DOCTYPE mdc SYSTEM
"MeasDataCollection.dtd"></FONT> <BR><FONT face="Courier New"
size=2><HTML:mdc xmlns:HTML="<A href="http://www.w3.org/TR/REC-xml"
target=_blank>http://www.w3.org/TR/REC-xml</A>"></FONT> <BR><FONT
face="Courier New" size=2></HTML:mdc></FONT> </P><BR>
<P><FONT face=Arial size=2>I am using XMLSpy to validate the generated
XML. When I load in my XML file I get this error:</FONT> </P>
<P><FONT face=Arial size=2>This file is not valid:Root element HTML:mdc not
defined in DTD/Schema</FONT> </P><BR>
<P><FONT face=Arial size=2>What can I do to generate the standard namespace
declaration? </FONT></P>
<P><FONT face=Arial size=2>Thank you for your help,</FONT> </P>
<P><FONT face=Arial size=2>Henry Charlton</FONT> <BR><FONT face=Arial
size=2>UMTS OAMP Design</FONT> <BR><FONT face=Arial size=2>Nortel
Networks</FONT> <BR><FONT face=Arial size=2>tel: 972.685.4405</FONT>
</P><BR><BR><BR><BR><BR><BR><BR></BLOCKQUOTE></BODY></HTML>