RE: [xsl] CDATA Handling

Subject: RE: [xsl] CDATA Handling
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 06 Jan 2009 19:55:55 -0500
At 2009-01-06 15:54 -0600, Scott Trenda wrote:
It's six of one and a half dozen of the other, really, but if you're switching to processing-instructions, why not use something like:

<x>See following image: <?image base64="R0lGODlhDQANAMQ0IAOw==" ?></x>

That way, the image data wrapper remains an easily-searched-for text pattern, as well as a single atomic unit in the XML infoset.

Personally I would not subscribe to this.

In my opinion, the comment and processing instruction annotations should be able to be completely removed from an XML document without changing its information. Yes, the processing of the information might change, but that nothing would be lost.

I recognize the suggested use of start and end delimited the information, so the argument could be made that even that route to this issue would lose some information if the annotations were removed.

But at least no data would be lost and could be recovered if all annotations were stripped.

When I teach XML I distinguish the two annotations as typically "comments for humans" and "pis for programs", and like the perspective of a DTD that cannot constrain annotations, there should be no inherent information *in* annotations. The data integrity should not be lost if all annotations are removed.

After all, the built-in template rules in XSLT do nothing with annotations. That says a lot to me there.

But that's just my perspective.

I hope this helps.

. . . . . . . . . . . Ken

Upcoming XSLT/XSL-FO, UBL and code list hands-on training classes:
:  Sydney, AU 2009-01/02; Brussels, BE 2009-03; Prague, CZ 2009-03
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:
Video overview:
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.
Male Cancer Awareness Nov'07
Legal business disclaimers:

Current Thread