H
Henry S. Thompson
Loading HTML into a JTextPane (1.4.2) w. an HTMLEditorKit works well,
except the SPAN tag doesn't seem to be supported properly -- it
renders as a space for start and end tag, and ignores class-based
style info, i.e.
<html>
<head>
<style type='text/css'>
.special {font-weight: bold}
</style>
</head>
<body>
<p>This
illustrates <span class='special'>|</span>the<span class='special>|</span>
problem.</p>
</body>
</html>
Appears like this:
This illustrates | the | problem.
I note that although SPAN is listed as an HTML.Tag, it's _not_ listed
in the table of actions for HTMLDocument.HTMLReader.
Is this a bug or a feature, and is there a well-known workaround?
Sorry if this is an FAQ, I googled pretty hard without finding
anything.
Thanks
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
except the SPAN tag doesn't seem to be supported properly -- it
renders as a space for start and end tag, and ignores class-based
style info, i.e.
<html>
<head>
<style type='text/css'>
.special {font-weight: bold}
</style>
</head>
<body>
<p>This
illustrates <span class='special'>|</span>the<span class='special>|</span>
problem.</p>
</body>
</html>
Appears like this:
This illustrates | the | problem.
I note that although SPAN is listed as an HTML.Tag, it's _not_ listed
in the table of actions for HTMLDocument.HTMLReader.
Is this a bug or a feature, and is there a well-known workaround?
Sorry if this is an FAQ, I googled pretty hard without finding
anything.
Thanks
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]