HTML textarea (was: [xml] Bug Issue?)
- From: "Peter Jacobi" <pj walter-graphtek com>
- To: "Stefan Willmert" <stefanw intellanet com>
- Cc: xml gnome org
- Subject: HTML textarea (was: [xml] Bug Issue?)
- Date: Sat, 17 May 2003 17:24:00 +0200
Hi Stefan,
It's not very pedagocical, to give you this
information before you have learned
everything about DOCTYPEs, but for
the two case you mentioned, there
are wellknown pragmatic solutions:
A)
<textarea name="name" rows="5" cols="50"/>
vs.
<textarea name="name" rows="5" cols="50"></textarea>
Give your textarea element node a text children with
white space content. Then it will get serialized as
<textarea name="name" rows="5" cols="50"> </textarea>
B)
<br>
vs
<br></br>
vs
<br/>
vs
<br />
Give your br element a harmless attribute (like name="foo"), and it
will be serialized as
<br name="foo"/>
which is OK with nearly every browser.
As Daniel has mentioned, libxml2 can be made more HTML friendly, but
above mentioned pragmatic solutions can be used for every XML
producing software, to get output which will be grokked fine by
nearly every browser.
Regards,
Peter Jacobi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]