[jdom-interest] Request for help using JDOM Beta 6 to create
namespace declaratio n
philip.nelson at omniresources.com
philip.nelson at omniresources.com
Fri May 11 11:47:34 PDT 2001
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.
-----Original Message-----
From: Henry Charlton [mailto:henryc at nortelnetworks.com]
Sent: Friday, May 11, 2001 10:29 AM
To: 'jdom-interest at jdom.org'
Subject: [jdom-interest] Request for help using JDOM Beta 6 to create
namespace declaratio n
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.
This is the desired output, based on the standards document (3GPP TS 32.104
V3.3.0 (2000-09) ) I need to be compliant with:
<!DOCTYPE mdc SYSTEM "MeasDataCollection.dtd">
<mdc xmlns:HTML=" http://www.w3.org/TR/REC-xml
<http://www.w3.org/TR/REC-xml> ">
</mdc>
This is the dtd:
<!-- MeasDataCollection.dtd version 1.1-->
<!ELEMENT mdc (mfh, md*, mff)>
<!ELEMENT mfh (ffv, sn, st, vn, cbt)>
<!ELEMENT md (neid, mi*)>
<!ELEMENT neid (neun, nedn)>
<!ELEMENT mi (mts, gp, mt*, mv*)>
<!ELEMENT mv (moid, r*, sf?)>
<!ELEMENT mff (ts)>
<!ELEMENT ts (#PCDATA)>
<!ELEMENT sf (#PCDATA)>
<!ELEMENT r (#PCDATA)>
<!ELEMENT mt (#PCDATA)>
<!ELEMENT moid (#PCDATA)>
<!ELEMENT gp (#PCDATA)>
<!ELEMENT mts (#PCDATA)>
<!ELEMENT nedn (#PCDATA)>
<!ELEMENT neun (#PCDATA)>
<!ELEMENT cbt (#PCDATA)>
<!ELEMENT vn (#PCDATA)>
<!ELEMENT st (#PCDATA)>
<!ELEMENT sn (#PCDATA)>
<!ELEMENT ffv (#PCDATA)>
<!-- end of MeasDataCollection.dtd -->
The output I have been able to achieve using the ctor public
Element(java.lang.String name, Namespace namespace) is:
<!DOCTYPE mdc SYSTEM "MeasDataCollection.dtd">
<HTML:mdc xmlns:HTML=" http://www.w3.org/TR/REC-xml
<http://www.w3.org/TR/REC-xml> ">
</HTML:mdc>
I am using XMLSpy to validate the generated XML. When I load in my XML file
I get this error:
This file is not valid:Root element HTML:mdc not defined in DTD/Schema
What can I do to generate the standard namespace declaration?
Thank you for your help,
Henry Charlton
UMTS OAMP Design
Nortel Networks
tel: 972.685.4405
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20010511/530f3733/attachment.htm
More information about the jdom-interest
mailing list