[jdom-interest] Dynamic DTD

Matthew MacKenzie matt at xmlglobal.com
Thu Feb 1 23:32:27 PST 2001


Michael,

You have two options from what I can see, both of the ugly.

1. Option using JDOM: call Document.setDocType(...) on an existing DOM,
persist the DOM (save it to a file or something), and reparse.

2. Option not using DOM: XML4J has a notion of a Revalidating parser,
which allows you to revalidate after modifying the DOM.  I haven't used
it, but it was the only way to revalidate that I saw available in Java.

Good luck.


--
Matthew MacKenzie
VP Research & Development
XML Global Technologies, Inc.

-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Michael Herrick
Sent: January 31, 2001 4:37 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] Dynamic DTD


Greetings.

I saw a couple of posts in the archives, but none of them answered my
question quite right.

Is there a way for me to get an XML document and *dynamically* apply a DTD
to it?

I am building an app that gets a message response from a queue.  The
response is in XML.  I'd like to dynamically apply a DTD to it if I can.

If I can't, not a huge deal, but it would be very helpful to me.

Also, it seems that absolute references don't work so well to DTDs.  When
I
would specify it as something like "c:\app\xml\temp.dtd", the parser would
choke on it, but "\app\xml\temp.dtd" was ok.  I found some posts on this,
but still don't really understand why this is ...

Any help on the above 2 q's?

Thanks!

Mike
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourh
ost.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2879 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20010201/bd67d299/smime.bin


More information about the jdom-interest mailing list