Author |
Message
|
kudlanka |
Posted: Fri Mar 12, 2010 6:19 am Post subject: One CDATA section expands to more CDATA sections |
|
|
Novice
Joined: 19 Mar 2009 Posts: 20 Location: Prague
|
Hello,
I havefollowing flow MQInput (undefined parser) - MQOutput -MQInput (XMLNSC parser) - (Trace) - MQOutput
I need to transport XML message with CDATA which includes xml generated for MS Word
Part of input message looks like this:
<CONF>
<![CDATA[<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="mx.kb.confirmation.FAX.FXD_soubory/filelist.xml">
<link rel=Edit-Time-Data href="mx.kb.confirmation.FAX.FXD_soubory/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
result looks like this:
<CONF>
<![CDATA[<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="mx.kb.confirmation.FAX.FXD_soubory/filelist.xml">
<link rel=Edit-Time-Data href="mx.kb.confirmation.FAX.FXD_soubory/editdata.mso">
<!--[if !mso]]><![CDATA[]><title>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]]><![CDATA[]-->
<title>
Input xml is well-formed (Altova XML Spy), I don't have xml schema to validate it.
I cannot find why CDATA is parsed and splitted into more CDATA parts.
Have somebody any idea?
Platform is: AIX, WMB 6.1
Thank you,
Kudlanka |
|
Back to top |
|
 |
kimbert |
Posted: Fri Mar 12, 2010 7:14 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 12, 2010 7:19 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
CDATA does not protect against a number of things. Including character sequences like "<!". |
|
Back to top |
|
 |
kudlanka |
Posted: Fri Mar 12, 2010 7:41 am Post subject: |
|
|
Novice
Joined: 19 Mar 2009 Posts: 20 Location: Prague
|
Thanks for your replies.
Kimbert, I am not sure what you mean. Yes, I read it and I think that source message is compliant with it - or not?
Quote: |
CDATA does not protect against a number of things. Including character sequences like "<!". |
mqjeff, can you point me somewhere to read about it?
Now I find out that difference is in xml and xmlnsc parser. XML parser behave as I want (and expect), xmlnsc parser creates additional CDATA sections. Why? |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 12, 2010 8:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
kudlanka wrote: |
Quote: |
CDATA does not protect against a number of things. Including character sequences like "<!". |
mqjeff, can you point me somewhere to read about it? |
kudlanka wrote: |
Now I find out that difference is in xml and xmlnsc parser. XML parser behave as I want (and expect), xmlnsc parser creates additional CDATA sections. Why? |
Because the XMLNSC parser is compliant with the XML standard, and the XML parser is lax. And your document *does not* comply to the XML standard. |
|
Back to top |
|
 |
kimbert |
Posted: Sat Mar 13, 2010 11:55 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The XML that you posted looks wrong. That may be because it got mangled when you posted it. Please do this:
- Copy and paste the XML from your original post into a text editor
- compare it with the XML that you *meant* to post
If there are differences, please post again, and use the Preview button to check that the posted XML is the same as you intended. |
|
Back to top |
|
 |
|