Author |
Message
|
wcrausch |
Posted: Wed Aug 29, 2001 1:24 pm Post subject: |
|
|
Novice
Joined: 28 Aug 2001 Posts: 17 Location: Denver, CO
|
I can't seem to locate
in the documentation how to create a DTD declaration. The format I need is:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE SYSTEM "Create_NC_Customer_10.dtd"Create_NC_Customer
but what I am getting is
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE SYSTEM "Create_NC_Customer_10.dtd"Create_NC_Customer
The ESQL that I have is:
SET OutputRoot.XML.(XML.XmlDecl)='';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version)='1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Encoding)='utf-8';
SET OutputRoot.XML.(XML.DocTypeDecl)='Create_NC_Customer';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId)='Create_NC_Customer_10.dtd';
Thanks in advance for any help you can give me.
Bill
[ This Message was edited by: wcrausch on 2001-08-29 14:26 ] |
|
Back to top |
|
 |
kolban |
Posted: Wed Aug 29, 2001 4:30 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Bill,
It looks like forum HTML interpretation has got you ... both examples (what you want and what you get) look identical to me. |
|
Back to top |
|
 |
wcrausch |
Posted: Wed Aug 29, 2001 6:12 pm Post subject: |
|
|
Novice
Joined: 28 Aug 2001 Posts: 17 Location: Denver, CO
|
Let's try that again
What I want is:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Create_NC_Customer SYSTEM "Create_NC_Customer_10.dtd">
and what I am getting is:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE SYSTEM "Create_NC_Customer_10.dtd"Create_NC_Customer>
Thanks again.... |
|
Back to top |
|
 |
wcrausch |
Posted: Wed Aug 29, 2001 6:30 pm Post subject: |
|
|
Novice
Joined: 28 Aug 2001 Posts: 17 Location: Denver, CO
|
I should also mention that I tried:
SET OutputRoot.XML.(XML.XmlDecl)='';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version)='1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Encoding)='utf-8';
SET OutputRoot.XML.(XML.DocTypeDecl)Create_NC_Customer='';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId)='Create_NC_Customer_10.dtd';
and I get an error in the Event Viewer (Windows 2000 platform) that the XML document has an invalid root.
Bill |
|
Back to top |
|
 |
kolban |
Posted: Wed Aug 29, 2001 7:36 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Warning: This is untested
SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Encoding) = 'utf-8';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = 'Create_NC_Customer_10.dtd';
SET OutputRoot.XML.Create_NC_Customer.SomeField = 'Hello!';
|
|
Back to top |
|
 |
wcrausch |
Posted: Thu Aug 30, 2001 5:37 am Post subject: |
|
|
Novice
Joined: 28 Aug 2001 Posts: 17 Location: Denver, CO
|
I usually have more XML following the DTD Decl, but I did not copy into my post.I tried that and the result is:
Hello!
According to the 2.0.1 documentation, my last ESQL should have been correct. Do you have any way of testing it on your machine? |
|
Back to top |
|
 |
wcrausch |
Posted: Thu Aug 30, 2001 7:11 am Post subject: |
|
|
Novice
Joined: 28 Aug 2001 Posts: 17 Location: Denver, CO
|
(I don't understand why this didn't show up in my last post....)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE SYSTEM "Create_NC_Customer_10.dtd">
<Create_NC_Customer>
<SomeField>Hello!</SomeField>
</Create_NC_Customer>
what is missing is the Create_NC_Customer after the DOCTYPE and before the SYSTEM
|
|
Back to top |
|
 |
wcrausch |
Posted: Tue Sep 04, 2001 12:16 pm Post subject: |
|
|
Novice
Joined: 28 Aug 2001 Posts: 17 Location: Denver, CO
|
I received a note from IBM, explaining how to do this. In case anyone else has the same problem, here is the solution:
SET OutputRoot.XML.(XML.XmlDecl)='';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version)='1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Encoding)='utf-8';
SET OutputRoot.XML.(XML.DocTypeDecl)Create_NC_Customer='';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId)
='Create_NC_Customer_10.dtd';
SET OutputRoot.XML.(XML.Element)Create_NC_Customer.Test= 'test';
Note the insertion of (XML.Element) to the last line. You need this to avoid a name conflict with the DocTypeDecl, which also has the same name (as is required by XML). |
|
Back to top |
|
 |
|