473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I follow the following steps to converting from HTML to XHTML

regards:

I follow the following steps to converting from HTML to XHTML
http://webpageworkshop.co.uk/main/xhtml_converting

My parser is http://htmlparser.sourceforge.net/
Xhtml version is 1.0 from http://nds.nokia.com/uaprof/N6600r100.xml

but nokia mobile browser cannot identify the converted file(XHTML1.0).
Is there something wrong with my procedure.

Or the web http://webpageworkshop.co.uk/main/xhtml_converting is
something weak.

Any positive suggestion is welcome.
thank you
May goodness be with you all
Jul 23 '05 #1
2 2830
mike wrote:
I follow the following steps to converting from HTML to XHTML
Why are you converting from HTML to XHTML?
http://webpageworkshop.co.uk/main/xhtml_converting
After reading this document, it was clearly written by someone that
doesn't really understand all the issues and I wouldn't trust it for
everything. For example, these are just some of the mistakes I
encounted as I skimmed through it, and there are probably more that I
missed.

Step 2: Incorrectly refers to the XML declaration (<?xml ... ?>) as the
"XML tag". [1]

Step 4:
| (The documentation states that you should use <br/>, but for some
| reason this doesn't always work, so the extra space in the element is
| suggested).

The reason it is advisable to insert the space is to comply with the
backwards compatibility suggestions in Appendix C of the XHTML 1.0
recommendation. This only applies to XHTML documents served as
text/html because they will be treated as tag-soup by the browser. It
is not necessary, though still valid, when the document is correctly
served as application/xhtml+xml (or other XML MIME type).

Step 5:
| XHTML states that all the attribute values must be surrounded by
| quotes, so for example <table width=100%> is no longer considered
| "well formed", whereas <table width="100%"> is.

While the statement about the requirement for all attributes in XHTML to
be quoted is correct, the implication that width=100% being valid in
HTML is not. Validating a document with that attribute results in this
error:

# Line 10, column 18: an attribute value must be a literal unless it
# contains only name characters

If his example had not contained "%", then it would have been correct,
but it has always be advisable to quote all attributes in HTML anyway.

Step 7:
The implication that the alt attribute was not always required in HTML
is incorrect, it is required equally for both HTML and XHTML documents.
His assertion that there is no longer a choice for XHTML documents is
somewhat misleading. It's absense will not result in an error from a
non-validating parser, and a validator will report the same error
regardless of whether the document is HTML or XHTML.
Step 8:
| In the past it has been acceptable to "overlap" your elements, for
| example <b><i>text</b></i>.

That is simply not true. A validator will report an error for that in
HTML as well, it's just that common tag-soup parsers silently ignore the
error and attempt to produce a structured DOM out of it anyway, though
each browser will produce a different result. [2]

However, in XHTML, the difference is that XML parsers are required to
give a well-formedness error, but that will only occur when the document
is served as XML.

Step 9:
The type attribute is required for HTML documents too. The implication
that it is not, is incorrect.

The document also omitted a lot of very important detail about MIME
types, differences with the way scripts and stylesheets will be handled,
and many more things. [3]
Xhtml version is 1.0 from http://nds.nokia.com/uaprof/N6600r100.xml
That document is not XHTML, it is a plain text document that looks like
RDF (though it's not being served as XML), but I'm not sure what it is
supposed to be exactly. Please explain what you meant more clearly.
but nokia mobile browser cannot identify the converted file(XHTML1.0).


There could be many problems, though without a URI for the document and
without knowing the exact error being given by your nokia phone, it is
impossible to diagnose.

[1] http://lachy.id.au/log/2004/12/html-tags
[2] http://ln.hixie.ch/?start=1037910467&count=1
[3] http://www.hixie.ch/advocacy/xhtml

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 23 '05 #2
It was somewhere outside Barstow when s9*****@mail.yzu.edu.tw (mike)
wrote:
but nokia mobile browser cannot identify the converted file(XHTML1.0).
Is there something wrong with my procedure.


You haven't shown us a URL for the converted file (or the original)

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lquast | last post by:
What's the best and fastest way to approach converting a large HTML site to XML? Thanks.
17
by: mickjames | last post by:
Hi, I'd like to include the whole web page content (as opposed to just the headlines) into RSS/XML to enable people to read them via rss feed readers. Question: how to convert HTML elements...
9
by: Philip TAYLOR | last post by:
Configuring a new instance of IIS, I noticed that it allows an HTML-formatted document trailer to be appended to every document served. Unfortunately, on checking its behaviour, I find that it...
29
by: Armand Karlsen | last post by:
I have a website ( http://www.zen62775.zen.co.uk ) that I made HTML 4.01 Transitional and CSS compliant, and I'm thinking of converting it into XHTML to learn a little about it. Which XHTML variant...
1
by: darrel | last post by:
I have two issues: 1) The WYSIWYG content editor we're using for our CMS doesn't truly support xhtml. 2) .net doesn't truly support xhtml my question is if there is a .net...
1
by: Paul | last post by:
I am very new to the power of css, but appreciate its power. THis is a super easy question, I am sure. I have the following in my aspx (html) page: <div id="outer" class="outer"> <div...
9
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP...
5
by: k.vanderstarren | last post by:
Hi All, I'm trying to convert some ASP.NET code that I found at http://weblogs.asp.net/dannychen/archive/2005/12/02/432190.aspx from VB to C#. I've managed to convert the portion that is in...
3
by: jitu78 | last post by:
Many Web designers and developers have been building Web pages for years. Just one person can create so many sites with so many pages that the thought of trying to convert all of them to anything is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.