A Jtidy and XHTML question

M

mike

regards:

I use Jtidy(java api introduced by w3c),to translate one HTML page into
XHTML page.

Now,I get the "XHTML" file

--------------------------------------------------------------------------
I write java code and simulate my machine as a HTTP server listening
port 85.

When client connect to my machine by using HTTP protocol.
In my program,I send the client the HTTP headers,there are 2 important
HTTP headers:(1)content-length: ?(2)content-type: ?

The parameter of "content-length:",I can decide.
What I ask is what kind of content-type I should apply to the "XHTML" file.

--------------------------------------------------------------------------
because the "XHTML" file is generated by Jtidy,I dont't know what kind of
mime type I should use to let the mobile browser to identify the "XHTML"
file.

Could someone excellent or experienced to tell me how?

thanks a lot
 
T

Thomas Fritsch

mike said:
regards:

I use Jtidy(java api introduced by w3c),to translate one HTML page into
XHTML page.

Now,I get the "XHTML" file

--------------------------------------------------------------------------
I write java code and simulate my machine as a HTTP server listening
port 85.

When client connect to my machine by using HTTP protocol.
In my program,I send the client the HTTP headers,there are 2 important
HTTP headers:(1)content-length: ?(2)content-type: ?

The parameter of "content-length:",I can decide.
What I ask is what kind of content-type I should apply to the "XHTML" file.

--------------------------------------------------------------------------
because the "XHTML" file is generated by Jtidy,I dont't know what kind of
mime type I should use to let the mobile browser to identify the "XHTML"
file.

Could someone excellent or experienced to tell me how?

thanks a lot
The XHTML specification can tell you:
http://www.w3.org/TR/xhtml1/#media
 
M

mike

The XHTML specification can tell you:

regards:

I would like to say sorry first,maybe I am wrong.

I doubt that if the Jtidy can exactly translate a HTML file into a
XHTML file.

My mobile client is nokia6600,and the wireless bearer is Wap.

I reply the mobile client(nokia6600) the standard XHTML page(page of
http://www.w3c.org) by the content-type: application/vnd.wap.xhtml+xml,
it is testing OK.

See the page showed on the nokia6600,and I am a little happy.

I use the same idea.I try to send the "XHTML file(produced by Jtidy)"

content-length:(I try to get the number from the OS)
content-type: application/vnd.wap.xhtml+xml

I fail.


Sequently,I change the content-type to application/xhtml+xml,
application/xhtml,application/xml, text/html,xml.............etc


I fail All of my tests.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top