| >> Agree completely.
| >> You will find some horror stories.
[quoted text clipped - 7 lines]
|
| Really? What limitations are there?
> | >> Agree completely.
> | >> You will find some horror stories.
[quoted text clipped - 16 lines]
> notation, but IE and Moz both read it
> as a paragraph...)
1. This concerns only the HTML parser, not JEditorPane at all.
You can plug in your own parser.
2. If you mean the XML *empty*-element notation (in your example
<p /> would mean <p></p> and </p /> is meaningless), e.g.
<img src="XXX" alt="YYY" />
this actually means something different in HTML (considered as an
SGML application and not tag-soup). IMO the Swing HTML parser is
correct here in parsing this as with a literal ">" at the end.
See
http://groups.google.com/groups?selm=39911fe6.3208216801%40news.cs.hut.fi
If you want XHTML, use a custom XHTML parser.
Christian

Signature
And in short, I was afraid.
Andrew Thompson - 26 Jan 2004 20:05 GMT
"Christian Kaufhold" ...
..
| > <p />The Paragraph</p />
...
| 1. This concerns only the HTML parser, not JEditorPane at all.
| You can plug in your own parser.
Right (as in ...'OK, I got it now' rather
than 'I knew that all along')
| 2. If you mean the XML *empty*-element notation
Yep, that is what I was thinking of..
[ As opposed to the fragment I writ,
which just happened to be understandable
by both browsers. ]
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Chris Smith - 27 Jan 2004 03:10 GMT
> 1. This concerns only the HTML parser, not JEditorPane at all.
> You can plug in your own parser.
[...]
> If you want XHTML, use a custom XHTML parser.
Okay, so I'm curious. Do you mean that you think it's possible to
purchase (or find) an editor kit for the full HTML 4 or XHTML standards?
Or do you simply mean that someone desiring these things should write
them?
I'm *very* interested here, because:
1. I've spent a good bit of time over the last two years writing and
maintaining some extensions to javax.swing.text.html.HTMLEditorKit for
an HTML editing component of a web-based training application sold by
MindIQ.
2. I am seriously considering the possibility that I will be writing an
editor kit from scratch to support full HTML 4 and XHTML in the near
future.
3. It is generally planned that when I do so, we will release the code
under an open-source license.
If such a beast already exists, and especially if such a beast (even in
an incomplete form) is already available under BSD-style or LGPL open-
source licensing, then this would make my life much easier... or at
least provide more options to consider before embarking on the task
myself.

Signature
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Christian Kaufhold - 28 Jan 2004 20:06 GMT
>> 1. This concerns only the HTML parser, not JEditorPane at all.
>> You can plug in your own parser.
[quoted text clipped - 7 lines]
> Or do you simply mean that someone desiring these things should write
> them?
Neither.
I was just talking about parsing here. Using a custom XHTML parser to
build a HTMLDocument should not be too difficult.
For most new XHTML/HTML4 elements, adding support at the usual leve
(both for storage and displaying) is easy.
Christian