This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: copying CData sections from the source to destination documents


> >Does it matter whether the output uses character references 
> or CDATA? They
> >are just different ways of expressing the same information.
> 
> I think so. What we are trying to do is embed an XML fragment (or even
> document) inside another XML document (they will have 
> different dtd's). The
> embedded XML is essentially irrelevant to my system in that I 
> do not want to validate it, check it, or transform it. I just want to pass

> it on to the downstream systems in its XML wrapper - (Its this wrapper I 
> want to perform a transformation on).

Well, as far as XSLT and XPath are concerned, characters written using CDATA
mean exactly the same as characters written using numeric character
references. But unfortunately there's no formal definition of XML semantics,
(the infoset, which is trying to address the problem, is informal and tries
to keep everyone happy) so you can attach meaning to anything you like,
including the number of spaces between attributes if you really want. And
admittedly some other standards in the XML family, such as DOM, do encourage
you to regard CDATA as a semi-logical construct. Which is perhaps why XSLT
provides the cdata-section-elements attribute in xsl:output.

Mike Kay 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]