cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject Re: disable-output-escaping
Date Tue, 08 Feb 2000 06:20:10 GMT

Geez, and I just said that it wasn't going to be there... now how the hell
did that happen?  :-)  Oops... I see I don't check for the
RawCharacterHandler interface in this case.  Sorry for the misinformation.
I'm loosing my mind.

> Actually I just looked at the HTML output of my testing and saw this PI
> sitting there:
>
> <?xslt-next-is-raw formatter-to-dom?>
>
> embedded. Is that hack you were mentioning? Is the fact that I'm using
> Xerces why it's showing up in my output rather than being processed the
> reason it's there?

Yes, it's the hack I was mentioning.  The fact that it's there could be
considered a bad thing.  What do other's think?  The issue is not the
configuration as such, it's the fact that output escaping for a DOM is kind
of a strange thing.  The Xerces serializers could easily support the above
hack, if people think it good and wise, I just don't think it's been
discussed yet.

So, this may be good news.  You could call registerSerializerFactory with a
class that supports the asDOMSerializer method, implement the serialize(
Document doc ) method that creates a org.apache.xalan.xpath.xml.TreeWalker,
passes in a org.apache.xalan.xpath.xml.FormatterToHTML to the TreeWalker
constructor, and calls the traverse(Node pos) method on the TreeWalker.
Or, perhaps easier, you could subclass Assaf's HTMLSerializer, override the
processingInstruction method, set a stateflag, then override the characters
( char[] chars, int start, int length ), and if the state flag is true,
then call characters( new String( chars, start, length ), false ); and turn
the state flag off.

Either way, it's a bit of work, probably more than you want to do.  But it
can be done!

-scott




                                                                                         
                            
                    Mike Engelhart                                                       
                            
                    <mengelhart@eart        To:     cocoon-dev@xml.apache.org         
                               
                    htrip.com>              cc:     (bcc: Scott Boag/CAM/Lotus)       
                               
                                            Subject:     Re: disable-output-escaping     
                            
                    02/08/00 12:12                                                       
                            
                    AM                                                                   
                            
                    Please respond                                                       
                            
                    to cocoon-dev                                                        
                            
                                                                                         
                            
                                                                                         
                            




Scott Boag/CAM/Lotus wrote:

>> text inside the HTML document that has been created by the
> transformation.
>
> Do you mean, instead of getting "<TABLE" you are getting "&lt;TABLE"?
>
> -scott
>

Actually I just looked at the HTML output of my testing and saw this PI
sitting there:

<?xslt-next-is-raw formatter-to-dom?>

embedded. Is that hack you were mentioning? Is the fact that I'm using
Xerces why it's showing up in my output rather than being processed the
reason it's there?

thanks,

Mike






Mime
View raw message