[cxml-devel] Ho do I write the following on a sink?

David Lichteblau david at lichteblau.com
Fri May 27 16:43:24 UTC 2011


Quoting Marco Antoniotti (marcoxa at cs.nyu.edu):
> Guys!  Throw me a bone here!!!!!
> 
> I don't want to roll out my own XHTML generator!
> 
> So, the culprit is SAX:CHARACTERS CXML::SINK , which calls CXML::UNPARSE-INDENTED-TEXT, which calls CXML::SINK-WRITE-EXCAPABLE-ROD.  This last function seems wrong as it hardcodes behavior.  The problem is that nowhere in the chain there is an obvious place where to put entity handling.  Or should CXML::SINK-WRITE-EXCAPABLE-ROD be rewritten?  If that is the case, where should entities be found?  In the sink, in a stash somewhere else?  Or maybe TRT is to build a special XHTML sink?
> 
> Any ideas?
[...]
> On May 16, 2011, at 10:58 , Marco Antoniotti wrote:
> 
> > 
> > On May 16, 2011, at 09:39 , Marco Antoniotti wrote:
> > 
> >> ...  Since I am using CXM to do the reading, it would be natural not to depend on YAL (Yet Another Library) to do the reading. 
> > 
> > I meant "writing" :}

cxml:unescaped is the "official" solution to implement this.
Please use that.

As for xhtmlgen, which you seem to be depending on: That's not an
official cxml api.  It is sample code based on htmlgen by Franz.  I've
never been a fan of htmlgen, but others like it, and I developed
xhtmlgen for bknr, which needed it.

It's basically still sample code.  Copy&paste material.

If you like it, just put it into your own project, and hack it as
desired to add any features you want changed.

Don't try to dig into any internals within cxml's package.  Just look at
xhtmlgen, if that is what you want to use.


d.




More information about the cxml-devel mailing list