RE: pretty printer and PCDATA

Subject: RE: pretty printer and PCDATA
From: "Frank A. Christoph" <christo@xxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Sep 1999 18:58:30 +0900
> It *seems* you were bitten by the infamous "Significant
> white-space in XML"
> problem, in its "Valid white-space in PCDATA" variant.
> >           <nmlist nametype="entity">entity5
> >           </nmlist>
> The spaces before the end-tag and the end-of-line after "entity5"
> are legal
> PCDATA and even Jade, which knowns your DTD, cannot find there are
> semantically insignificant.
> > Does anyone know of a solution or a workaround ?
> There have been a lot of discussion about this in lists like
> xml-perl and the newsgroup comp.text.xml. The solutions are:
> - type '<nmlist nametype="entity">entity5</nmlist>'
> - "trim" the spaces and end-of-lines when they appear at the
> beginning or ending of a PCDATA node. I know how to do it in Perl
> (that's what I use) but not in DSSSL, sorry.

In DSSSL you would use process-children-trim in place of process-children
when processing the parent of nmlist. That will eliminate leading _and_
trailing spaces.

At least, that is the easiest way to do it.


 DSSSList info and archive:

Current Thread