- This topic has 9 replies, 1 voice, and was last updated 3 years ago by community-content.
May 17, 2006 at 8:30 PM #13632
May 18, 2006 at 6:58 PM #13633
As far as I know there is no schema definition for CDATA. It’s just a statement in XML that temporarily turns off the well-formed-ness parser.
May 19, 2006 at 3:12 PM #13634
The program that creates the XML would have to include the CData tag in the XML itself. Where does your XML come from?
May 19, 2006 at 10:14 PM #13635
Okay, let’s go back to the original issue. According to Stylus Studio, the XML is not well-formed. Even Internet Explorer browser says:
Reference to undefined entity ‘ndash’. Error processing resource ‘file:///C:/TestNdash.xml’. Line 1, Position 37
So rule #1 of XML is that XML has to be well-formed. How can another company send you XML that is not well-formed?
In my opinion, they must provide well-formed XML.
If they refuse, then you must somehow translate it to well-formed XML, probably through writing your own ReceivePipeline.
May 19, 2006 at 10:30 PM #13636
I started thinking about this some more – so apparently XML doesn’t support things like – or even (I just now noticed your URL’s in your original message – sorry I didn’t look at them earlier.)
Since is more common I googled it and found this:
is not a default XML entity. Either use a DTD to define it or use the
unicode hex value directly in the entity (Š IIRC).
But I’ll stick with my earlier statement that your trading partner must send your well-formed XML.
May 17, 2006 at 7:49 PM #13637
I have a [b:2146b2a22a]<Any> [/b:2146b2a22a]element in my Schema to catch any type of content –
[code:1:2146b2a22a]<xs:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"MixedDescription\">
<xs:any processContents=\"skip\" />
But it does not catch entities like this – –
[code:1:2146b2a22a]<MixedDescription>….some content – … content continues</MixedDescription>[/code:1:2146b2a22a]
XmlSpy, Stylus Studio and Visual Studio all point out that this is an undeclared charater entity.
I came across this idea to implement entites as elments –
but there are a LOT of characters to replace which are possible Xml Character entities
(I would have to do this in preprocessing)
Is there a simpler way than to replace so many entities? (As I work for a publishing house any of these could be possibly expected).
Why doesnt the <Any> element catch character entities?
May 17, 2006 at 8:52 PM #13638
May 18, 2006 at 7:06 PM #13639
Right, but how to instruct Biztalk that one node is a CDATA node and ignore its contents?
[quote:2194b5c23a=\”nwalters\”]As far as I know there is no schema definition for CDATA. It’s just a statement in XML that temporarily turns off the well-formed-ness parser.
May 19, 2006 at 6:05 PM #13640
OK I figured this out via this hint
Use an XSLT library called xmlchar
and in the instance add this line (via pre-processing) (where xmlchar is the href to the library URI)
[code:1:b26201e1f6]<!DOCTYPE ONIXMessage[<!ENTITY % html.4.entities SYSTEM \"xmlchar/html4-all.ent\">%html.4.entities;]>
<ONIXMessage xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ch=\"http://xmlchar.sf.net/ns#\" …(other declarations) >[/code:1:b26201e1f6]
Don’t forget to add the xmlns:ch declaration and make sure the DOCTYPE root node is your root node.
May 19, 2006 at 6:36 PM #13641
From the suppliers I dont have control over. That was the whole point.
[quote:14d1356a76=\”nwalters\”]The program that creates the XML would have to include the CData tag in the XML itself. Where does your XML come from?
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.