[OT] XHTML -> XHTML: How can entities preserved?

F. GEIGER fgeiger at datec.at
Wed Oct 9 05:21:59 EDT 2002


I do process XHTML files with a Python app, that calls a couple of
processing objects.

One of them is a class called Shaper. The Shaper takes an XHTML file as
input, processes all H1, H2, etc. elements and outputs it again into an
XHTML file. It does so by calling an XSLT processor.

The problem here is, that entities are converted, e.g. ' ' becomes ' '.
This is not what I want. I want all entities being preserved for the
client's browser.

As my app runs on a W2k box, I use the MS XSL processor. In their help they
show a method to preserve entities: cdata-section-elements. Actually all
data defined by cdata-section-elements are put into CDATA sections. But this
is not for HTML output: "HTML does not recognize CDATA sections. Do not use
this option when generating HTML."

I guess this not an MS XSL issue but a general XML/XSL issue, right?

Any idea?

Many thanks and best regards
Franz GEIGER







More information about the Python-list mailing list