xml version

For technical support for all editions of CSE HTML Validator. Includes bug reports.

xml version

Postby Walter Metzger » Thu Apr 21, 2011 2:30 pm

Good evening,

I have the following problem:
When I use
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!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">
... and so on

I get no comment with CSE HTML 10.0120,
but proofing my homepage (http://www.koerperbehinderte-es.de) with http://validator.w3.org
I receive mistakes for coded letters p.e. "ä" = "&auml;" and so on.
-----------------------------
When I use (without the first line)
<!-- <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
... and so on

I get a comment with CSE HTML 10.0120,
(I do not understand this comment)
but proofing my homepage (http://www.koerperbehinderte-es.de) with http://validator.w3.org
I receive
"This document was successfully checked as XHTML 1.0 Transitional!"

What can I change?

I have a second question after just my searching:

When I use the beginning line
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
is it then not necessery to encode umlaute (as german ä,ö,ü) and special characters (as our ß) ?

Perhaps somebody can help me?
Greetings form Germany (wonderful spring)
Walter
Walter Metzger
Rank II - Novice
Rank II - Novice
 
Posts: 32
Joined: Tue Feb 26, 2008 1:57 pm
Location: Germany

Re: xml version

Postby Walter Metzger » Fri Apr 22, 2011 5:51 am

Good day,

I think, I found a possibility,
I changed
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
to
<?xml version="1.0"?>

then I receive
1. validate Current Document: no comment from CSE HTML Pro 10.0120
and
2. http://validator.w3.org gives back
"This document was successfully checked as XHTML 1.0 Transitional!"

Is this possibility a solution?

Greetings from Germany
Walter
Walter Metzger
Rank II - Novice
Rank II - Novice
 
Posts: 32
Joined: Tue Feb 26, 2008 1:57 pm
Location: Germany

Re: xml version

Postby Albert Wiersch » Fri Apr 22, 2011 6:07 pm

I'm sorry for the delay. I should be able to reply in more detail early next week.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: xml version

Postby Albert Wiersch » Mon Apr 25, 2011 3:04 pm

Walter Metzger wrote:I get no comment with CSE HTML 10.0120,
but proofing my homepage (http://www.koerperbehinderte-es.de) with http://validator.w3.org
I receive mistakes for coded letters p.e. "ä" = "&auml;" and so on.


Hello Walter,

Please try removing this part in the XML declaration:
Code: Select all
standalone="yes"


Walter Metzger wrote:-----------------------------
When I use (without the first line)
<!-- <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
... and so on

I get a comment with CSE HTML 10.0120,
(I do not understand this comment)
but proofing my homepage (http://www.koerperbehinderte-es.de) with http://validator.w3.org
I receive
"This document was successfully checked as XHTML 1.0 Transitional!"


Do you mean the comment about using an XML declaration? I generally recommend using utf-8 encoding with something like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>


Walter Metzger wrote:When I use the beginning line
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
is it then not necessery to encode umlaute (as german ä,ö,ü) and special characters (as our ß) ?


Here is more information about ISO-8859-1:
http://htmlhelp.com/reference/charset/

It looks like those are valid characters for that character set, so you can directly use them (without using character references) assuming your file is always edited with a program that won't corrupt the document and correctly handles the encoding.

Hope this helps!
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: xml version

Postby Albert Wiersch » Mon Apr 25, 2011 3:05 pm

Walter Metzger wrote:Good day,

I think, I found a possibility,
I changed
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
to
<?xml version="1.0"?>

then I receive
1. validate Current Document: no comment from CSE HTML Pro 10.0120
and
2. http://validator.w3.org gives back
"This document was successfully checked as XHTML 1.0 Transitional!"

Is this possibility a solution?


I think the answer/solution was removing this:
Code: Select all
standalone="yes"


You can keep the encoding if you'd like, or change it to utf-8.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: xml version

Postby Walter Metzger » Tue Apr 26, 2011 5:05 am

Albert, Thank You for the quick answer,
my problem ist not solved to 100%.

In former times I did not use
1.
<?xml version="1.0"?>
or 2.
<?xml version="1.0" encoding="UTF-8"?>
or 3.
<?xml version="1.0" encoding="ISO-8859-1"?>
or 4.
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
before the following line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
etc.

The reason to use <?xml ... ?> was, that CSE HTML Valitator PRO at a certain time
wrote the comment:
[24] The XHTML recommendation strongly encourages that an XML declaration be used as the first line ....

Till this time I had always encoded Umlauts and special characters (as german ä = &auml; and ß = &szlig; and some more).
Choosing 1. till 4. was a "good comment" for CSE HTML Valitator PRO.
So I choosed <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> and did not know, why (!?)

Checking coincidentally my homepage with w3c before time, I got a bad result.

Now I began to search a solution

German forums say, a beginning line (as 1. bis 4.) would not be necessary.

Now is my last questions:
I use
1.
<?xml version="1.0" encoding="ISO-8859-1"?>
2. or
<?xml version="1.0" encoding="UTF-8"?>

a) What ist the better line, 1. or 2. ?

b) When I use 1. or 2., do I have to encode Umlauts and special characters (as german ä = &auml; and ß = &szlig; and some more) ?

I hope I can be understood with my "great problem"
Greetings
Walter
Walter Metzger
Rank II - Novice
Rank II - Novice
 
Posts: 32
Joined: Tue Feb 26, 2008 1:57 pm
Location: Germany

Re: xml version

Postby Albert Wiersch » Tue Apr 26, 2011 9:29 am

Walter Metzger wrote:Now I began to search a solution

German forums say, a beginning line (as 1. bis 4.) would not be necessary.


Hi Walter,

Yes, it's not necessary, but XHTML recommends it.

Walter Metzger wrote:Now is my last questions:
I use
1.
<?xml version="1.0" encoding="ISO-8859-1"?>
2. or
<?xml version="1.0" encoding="UTF-8"?>

a) What ist the better line, 1. or 2. ?


I would say 2 because it is Unicode and should be a "safe bet" with today's software.

Walter Metzger wrote:b) When I use 1. or 2., do I have to encode Umlauts and special characters (as german ä = &auml; and ß = &szlig; and some more) ?


If the document character set (like utf-8) supports the characters you want and the editors & software that you use to edit the file properly work and correctly recognize and use the correct encoding, then you should not have to encode the characters. However, using character references is safer because they are less likely to get corrupted by using software that doesn't properly use, support, or recognize the document's encoding.

Hope this helps!
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: xml version

Postby Walter Metzger » Tue Apr 26, 2011 9:53 am

Tank You Albert,

I´ll take
<?xml version="1.0" encoding="UTF-8"?>
and further encode
umlauts and special characters.

Greetings from Germany (We need rain, rain and rain)
Walter
Walter Metzger
Rank II - Novice
Rank II - Novice
 
Posts: 32
Joined: Tue Feb 26, 2008 1:57 pm
Location: Germany

Re: xml version

Postby Albert Wiersch » Tue Apr 26, 2011 10:51 am

Walter Metzger wrote:Tank You Albert,


You're welcome!

Walter Metzger wrote:I´ll take
<?xml version="1.0" encoding="UTF-8"?>
and further encode
umlauts and special characters.


Sounds like a good choice. :D

Walter Metzger wrote:Greetings from Germany (We need rain, rain and rain)
Walter


Greeting from US of A... hope you get some rain. We've gotten some needed rain around here lately, but it has come with strong winds & hail and a few tornadoes. :(

Image Image
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest