it amounts to the same thing - anything inside a CDATA section is ignored by the parser, even non-entity < and > symbols. But hmmm ... not sure if that means it can be dumped as output text in transformations, or whether it's just a comment that can't be transformed. You'd have to try it and see.
But either way, DTD won't help you here - DTD cannot control what kind of data is allowed inside an element, only whether it's CDATA, PCDATA or a combination of those two plus other elements. XSD, I think, can do this - but I know almost nothing about XSD.
And in any case ... this whole thing about putting entity-HTML inside XML is strange; I see it a lot, particularly in weblogs - an XML node with HTML inside it which is supposed to be parsed as literal HTML inside the transformed node. But my opinion is that this is sloppy XML; you should not add visual markup or attempt to imply formatting within data XML.
What you can do, to get a proper solution to this, is make the <pre/> node a real XML node - cite it in your DTD and then parse it into an HTML <pre/> element in when you're generating your page.
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark
Last edited by brothercake; 03-20-2003 at 12:00 AM..