[jdom-interest] Fw: Request for help using JDOM Beta 6 to create namespace declar atio n

Brett McLaughlin brett at newInstance.com
Fri May 11 21:59:25 PDT 2001


Guys-

  I'm gonna be tied up this weekend, but was hoping one of you on the
jdom-interest list could help out Henry with his problems... the (short)
thread of what's going on is below.

Thanks,
Brett

----- Original Message -----
From: "Henry Charlton" <henryc at nortelnetworks.com>
To: "'Brett McLaughlin'" <brett at newInstance.com>
Sent: Friday, May 11, 2001 11:04 AM
Subject: RE: Request for help using JDOM Beta 6 to create namespace declar
atio n


> Brett,
>
> Thanks for your reply.  Unfortunately, I am an XML newbie tasked with
> converting a proprietary data file to the standards-based XML file.  The
> section quoted below is directly from the standards document, and I was
> simply trying to duplicate it.
>
> Assuming (I am really just guessing) that the intent is to provide a
> reference to the supporting W3C Rec., and that the root element
declaration
> was the most obvious place to do it, is there a way using JDOM that I can
> duplicate this kind of declaration?  (For my project, we must be able to
> check off the 3GPP - compliant bullet).
>
> Henry
>
>
>
>
> -----Original Message-----
> From: Brett McLaughlin [mailto:brett at newInstance.com]
> Sent: Friday, May 11, 2001 10:38 AM
> To: Charlton, Henry [RICH6:AM41:EXCH]
> Subject: Re: Request for help using JDOM Beta 6 to create namespace
> declaratio n
>
>
>
> ----- Original Message -----
> From: "Henry Charlton" <henryc at nortelnetworks.com>
> To: <brett at newInstance.com>
> Sent: Friday, May 11, 2001 10:17 AM
> Subject: Request for help using JDOM Beta 6 to create namespace declaratio
n
>
>
> > Brett,
> >
> > 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">
> > </mdc>
>
> You realize that the mdc element is NOT in the namespace you declare,
right?
> This is really a bit of an odd document; it declares a namespace that is
> never used. Doesn't make much sense... I'll let you respond to that before
> takng on your problem. If you want the mdc element in the REC-XML
namespace,
> you want:
>
> <!DOCTYPE mdc SYSTEM "MeasDataCollection.dtd">
> <mdc xmlns="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">
> > </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
> >
> >
> >
> >
> >
> >
> >
> >
>
>




More information about the jdom-interest mailing list