xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mandy.s...@uk.catalyst-solutions.com
Subject Writing XML dynamically given a DTD
Date Mon, 04 Dec 2000 13:02:53 GMT
Hallo,

I have the following requirement.

XML message comes in to Java program (eventually to be servlet) which
parses it and calls an SQL stored procedure via JDBC - name of stored
procedure, and all parameters, being flexible and part of the XML message
content.

The results (in the form of SQL result sets) are to be sent back as another
XML message, formatted according to the appropriate DTD. The name of the
element giving the right format for this particular stored procedure's
output message is yet another of the pieces of information in the incoming
XML message (I hope this is reasonably clear).

The input piece, calling stored procedure, etc., are all working fine. I
can get the result sets back without trouble (have done this many times
elsewhere).

My first problem is that I cannot despite much research find any classes
that will allow me to fully identify the DTD for the document I am
currently parsing (getDoctype() gives me the DOCTYPE, but the DocumentType
getSystemId() class (DOM 2 support) doesn't seem to be available in any of
the (many) versions of xml4j I have tried).

My second problem is that even if I hard-code the system id for the DTD
(assuming that the same string as in the top of the XML is what's needed)
the com.ibm.xml.parser.DTD class will not list any external elements
whichever of its many apparently relevant methods I try to use. It appears
that the DTD class can't see any of the good stuff in the DTD.

So - help please! Has anyone done anything like this, or is anyone able to
point me at what I may be doing wrong?

Thanks a lot.

Regards,
Mandy Shaw

Catalyst Solutions plc
Kingfisher House
Frimley Business Park
Camberley
Surrey
GU16 5SG
UK

http://www.catalyst-solutions.com
Email: Mandy.Shaw@uk.catalyst-solutions.com

Telephone: +44 (0)870 166 1000
DDI: +44 870 166 1324
Facsimile: +44 870 168 3920
Mobile: +44 410 447966




----------------------------------------------------------------------
Catalyst Solutions plc.  Registered No 2918101.
Registered @ Kingfisher House, Frimley Business Park, Frimley,
Surrey. GU16 5SG   U.K.

NOTICE:
This message is intended only for the named addressee(s) and may
contain confidential and/or privileged information. If you are not the
named addressee you should not disseminate, copy or take any action
or place any reliance on it. If you have received this message in error
please notify postmaster@catalyst-solutions.com and delete the message
and any attachments accompanying it immediately.
----------------------------------------------------------------------



Mime
View raw message