cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Bug in HTMLSerializer?
Date Wed, 16 Jun 2004 07:09:28 GMT
On Tue, 2004-06-15 at 16:44, Stephan Coboos wrote:
> Hello,
> 
> in my XML doc I need to declare some entities. But if I do so, I cant 
> use the HTMLSerializer to output my doc because a braket > appears on 
> the right top corner. Why? Is it a bug in HTMLSerializer? What can I do 
> to avoid this?

This is a problem in the Xalan serializer. You could file a bug report
with them. (but make sure you're using the latest version -- I seem to
remember that something like this was fixed before).

As a workaround, you can include a transformer in your pipeline that
throws away all events between the start and end of the doctype. For
example, inserting an identity XSLT transform will do this (though not
in the most optimal way).

> 
> My xml doc:
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE html [
>    <!ENTITY foo "bar">]>
> <html>
> &foo;
> </html>
> 
> My pipeline:
> 
>       <map:match pattern="test">
>          <map:generate type="file" src="test.xml"/>
>          <map:serialize type="html"/>
>       </map:match>
> 
> My browser output (source):
> 
>  >
> <html>
> bar
> </html>
> 
> Look at the first braket > on top of the source. Why is it there?
> 
> Thank you for your help!
> 
> Regards
> Stephan
-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message