probem with mediatype="text/html" when data is an empty div element

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

probem with mediatype="text/html" when data is an empty div element

Doug Young

 

Hi,

 

When I use output with the mediatype="text/html" attribute and the data is an empty div element I get the error Cannot parse value as text/html.

But I try to output the same div except with some content it works OK. Is this a bug ?

 

  The attached xhtml shows the problem.

 

regards

  Doug Young

 

Doug Young

Software Engineer

 

Teleflex IT

1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

+44 (0) 1506 407107

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

bad-xhtml-test.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: probem with mediatype="text/html" when data is an empty div element

Alessandro  Vernet
Administrator
Doug,

The HTML parsing is done with JTidy, which is very tolerant, but
doesn't seem to handle XHTML very well.

a) In the case where you have <xhtml:div>X</xhtml:div>, JTidy ignores
the div but recognizes the X. So in the end you end up with just X.
b) In the case where you have just <xhtml:div></xhtml:div>, JTidy
doesn't recognize anything and because of that our code chokes.

By extension to (a), it would make sense to display nothing in (b)
instead of throwing an exception. I changed our code to do that, so
you won't have an exception in this case anymore.

Here is the corresponding bug, which is now fixed:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=306513&group_id=168&atid=350207

Alex

On 12/6/06, Doug Young <[hidden email]> wrote:

>
>
>
>
>
>
> Hi,
>
>
>
> When I use output with the mediatype="text/html" attribute and the data is
> an empty div element I get the error Cannot parse value as text/html.
>
> But I try to output the same div except with some content it works OK. Is
> this a bug ?
>
>
>
>   The attached xhtml shows the problem.
>
>
>
> regards
>
>   Doug Young
>
>
>
> Doug Young
>
> Software Engineer
>
>
>
> Teleflex IT
>
> 1 Michaelson Square
>  Livingston
>  West Lothian
>  Scotland
>  EH54 7DP
>
>
> +44 (0) 1506 407107
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet