Author |
Message
|
madi |
Posted: Tue Feb 07, 2006 8:41 am Post subject: DocTypeDecl |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Hi All
I am trying to create the following msg.
<!DOCTYPE Transaction (View Source for full doctype...)>
- <Transaction>
- <Products>
</Products>
</Transaction>
Is it possible because when I try it, I get an error saying
Code: |
No valid body of the document could be found.
There should be one, and only one, top level element of type Element or EmptyElement and this is not the case for the current message.
Check that the XML message being passed in is a well formed XML message that adheres to the XML specification and that only one of the above exists as a child of the root. |
Can the DOCTYPE and the Root be the same, if they can be how do I code it?
here is the code im using if u need it:
Code: |
SET OutputRoot.XML.(XML.DocTypeDecl)Transaction = ''; |
thanks
madi |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Feb 07, 2006 8:30 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi madi,
I don't think there is a problem with the DOCTYPE and Root being the same name...
If you search the Toolkit Help using "!DOCTYPE" you'll find the first three hits to be perfect to this discussion.
Anyway you are going in the right direction, why dont you implement this and tell us the results too..
Do remember to uncheck the "Supress Doctype" in message set.
Regards. |
|
Back to top |
|
 |
madi |
Posted: Wed Feb 08, 2006 6:43 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Hi Elvis
I have gone through the help.
I am not using Message Sets, just using compute to transform XML. So I wouldnt have to set Supress DOCTYPE
The DOCTYPE works if it is different from the root.
thanks
madi |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 08, 2006 7:00 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Have you tried putting your xml document through a stand-alone XML parser?
I tried it with xercesJ, and it complained about the DOCTYPE declaration. Not sure whether the part in (...) is really part of your document, though. |
|
Back to top |
|
 |
madi |
Posted: Wed Feb 08, 2006 7:12 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
No the part in (...) is not a part of the message.
It will be for example
Code: |
<!DOCTYPE Transaction SYSTEM "www.dtdfillfilment.com/Transaction.dtd"> |
thanks
madi |
|
Back to top |
|
 |
JT |
Posted: Wed Feb 08, 2006 7:21 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
I think you have to explicitly identify that the XML element Transaction is not part of the doctype:
Code: |
SET OutputRoot.XML.(XML.Element)Transaction.Products = 'whatever'; |
|
|
Back to top |
|
 |
madi |
Posted: Wed Feb 08, 2006 7:30 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Yup. That was it!!
Thanks JT
Thanks All
madi |
|
Back to top |
|
 |
|