[xml] --loaddtd bug or feature?
- From: Florent Guiliani <flgu 4js com>
- To: xml gnome org
- Subject: [xml] --loaddtd bug or feature?
- Date: Fri, 08 Feb 2008 17:26:15 +0100
Hi all,
I'm wondering why xmllint --loaddtd (aka XML_PARSE_DTDLOAD) combined with
--format option produce a different result in this 2 test case:
test case 1:
===========
flgu oslo:~$ cat << EOF | xmllint --format --loaddtd -
> <?xml version="1.0"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <body><p></p></body>
> </html>
> EOF
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<p></p>
</body>
</html>
flgu oslo:~$
This result is the expecting result.
test case 2:
===========
flgu oslo:~$ cat << EOF | xmllint --format --loaddtd -
> <?xml version="1.0"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <body><p></p> </body>
> </html>
> EOF
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body><p></p> </body>
</html>
flgu oslo:~$
Note the space char inserted bitween </p> and </body>. Why this single space
char has broke the reindent process ?
Do you think that test case 2 is getting the espected result or do you think
that test case 2 is revealing a bug ?
The indent process isn't broke if you remove --loaddtd option.
Florent,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]