Re: question on mapping of character entity references

Subject: Re: question on mapping of character entity references
From: James Clark <jjc@xxxxxxxxxx>
Date: Tue, 20 May 1997 11:55:13 +0700
At 16:26 19/05/97 -0400, Kevin Desmarais wrote:
>I am using Jade and DSSSL to translate documents from one DTD to another
>and I need to keep character entity references in-tact in my SGML.  It
>appears that Jade has a default behavior is to replace character entity
>references on translation.  Is there anyway to disable this behavior or to
>get around it?

Not that I can think of.

I have just added a little hack to the SGML transformation backend to help
with this:

preserve-sdata?

This is an inherited boolean characteristic that applies to character
flow objects.  When true, if the current-node for the character flow object
was an sdata node, then the character will be output as a reference
to an entity with the same name.
The initial value is #f.

This means if you add

(declare-characteristic preserve-sdata?
  "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
  #t)

to your style-sheet, then SDATA entity references in content will
automagically be preserved.  It won't help with SDATA entity references in
attribute values nor with references to non-SDATA entities: that would
require a more complicated solution.

James


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread