[xslt] xsltproc/libxslt
- From: Siegfried Gipp <siegfried rorkvell de>
- To: xslt gnome org
- Subject: [xslt] xsltproc/libxslt
- Date: Wed, 30 Jan 2008 11:21:27 +0100
Hi,
while xsltproc is working fine with xml and xhtml documents it has some errors
in outputting html. I'm currently using a sed file to correct them:
1,3s/\/\/EN\"\"http/\/\/EN\" \"http/
s#xmlns=\"http://www.w3.org/1999/xhtml\"##g
s#/>#>#g
s/\&action/\&action/g
s#<link\([^>]*\)></link>#<link\1>#g
s#<meta\([^>]*\)></meta>#<meta\1>#g
s#<input\([^>]*\)></input>#<input\1>#g
s#<br></br>#<br>#g
s#<hr></hr>#<hr>#g
s#<textarea\([^>]*\)/>#<textarea\1></textarea>#g
s#<script\([^>]*\)/>#<script\1></script>#g
The first line throws in an extra space in the DOCTYPE.
The second line is possibly not necessary, but html pages do not validate at
w3c with a namespace.
The third line removes those shorthand tag endings since the validator throws
warnings about that.
The next three lines do correct real invalid html. In html it is not allowed
to write <meta name="..." content=".."></meta>. Although this is correct in
xml, it is not in html. The same is for input, hr and br.
The opposite is true for <script>. This must always be written in the form
<script></script> in html even if there is no content. Anything other is
invalid.
Regards
Siegfried
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]