Ken - this is a developer support mailing list and as such, incorrect statements sometimes will get posted; we are not all experts at everything (my specialty happens to lie with the Oracle RDBMS and even then I'm not an expert). I apologize if what I indicated (wrongly) might mislead others. Thankfully, persons such as yourself and Michael Blakeley of MarkLogic are around to correct such inaccuracies.
Bottom line, Marklogic has a bug that allows invalid XML to be successfully saved but then chokes when replicating that invalid XML using their own, internally developed replication code. Regards, Allen ________________________________ From: G. Ken Holman <gkhol...@cranesoftwrights.com> To: General Mark Logic Developer Discussion <general@developer.marklogic.com> Sent: Thu, July 15, 2010 2:36:15 PM Subject: Re: [MarkLogic Dev General] CDATA sections being removed from XML documents by Marklogic At 2010-07-15 10:32 -0700, cashatzer-markm...@yahoo.com wrote: >Why is MarkLogic stripping the CDATA sections? Because it is following the standard. >It should not do this. If it did, it would not be conformant to the standards. >Applications should not have to reprocess their documents to put >CDATA sections around text that was already wrapped previously. Yes, they should! CDATA is only syntactic sugar so as not to have to escape markup on a per-character basis. CDATA is not information and is not recognized in the XPath data model. CDATA is *not* something that is preserved by conforming engines. There is no difference in the data model between: This is <![CDATA[a]]> test. and This is a test. >EXAMPLE: > >cqsh> xdmp:document-insert("testcdata.xml", > -> <doc><![CDATA[This is a test if not escaped, this should > not work]]></doc>); >Done (0.04 sec) > >cqsh> for $i in //doc return $i; ><doc>This is a test if not escaped, this should not work</doc> >Done (0.01 sec) >cqsh> xdmp:document-insert("testcdata.xml", > -> <doc>This is a test if not escaped, this should not work</doc>); >--------------------------- > XQuery Error >--------------------------- >Message: XDMP-CHARREF: (err:XPST0003) Invalid character reference >"24 if not escaped, this should not work" >--STACK DUMP-- >line number: 1 >context item: null >context position: 0 >uri: /eval >variable bindings: That error is bona fide because when using XML 1.0 you cannot use the character $ ... if you want that character, then it is obvious you have to use XML 1.1. You can see an example of me using XML 1.1 for that character (as ) in this XSLT stylesheet: http://sportsmlt.svn.sourceforge.net/viewvc/sportsmlt/2.0/support/sportsmlt2-character.xsl?revision=13 In the future, I suggest you be careful not to make such broad and incorrect claims that may be misleading readers of the archive into believing things that are not true. I hope this helps. . . . . . . . . . . . Ken -- XSLT/XQuery training: after http://XMLPrague.cz 2011-03-28/04-01 Vote for your XML training: http://www.CraneSoftwrights.com/q/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/ G. Ken Holman mailto:gkhol...@cranesoftwrights.com Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/q/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general