"XHTML file" cannot be identified by nokia 66

M

mike

regards:

I use Jtidy (api) to translate a HTML file into a "XHTML file".
But The "XHTML file" cannot be identified by nokia 6600.
Do I miss something important?
Or this is Jtidy's weakness or bug?

Can someone excellent to tell me the reason.

best wishes
 
J

Johannes Koch

mike said:
I use Jtidy (api) to translate a HTML file into a "XHTML file".
But The "XHTML file" cannot be identified by nokia 6600.
Do I miss something important?
Or this is Jtidy's weakness or bug?

Can someone excellent to tell me the reason.

Could you provide a URI for your XHTML file?
 
M

mike

regards: Johannes Koch

regards: Johannes Koch

I write java code to simulate my machine as a HTTP server,when
client
connect to my HTTP server,my HTTP server replied client a xhtml
file.

I use the HTTP headers by spec.
(1)Content-Length: (length of file which will be transmitted)
(2)Content-Type: application/vnd.wap.xhtml+xml

when I transmit a standard XHTML file,it is OK.
Nokia 6600 can identify the standard XHTML.

when I transmit a XHTML file produced by Jtidy,it is not OK.
Nokia 6600 cannot identify the XHTML file.

the following

part 1 is my java code:
part 2 is a XHTML file produced by Jtidy
--------------------------------------------
part 1:
import java.io.*;
import java.net.*;

public class HttpMirror {

public static void scopy(FileInputStream ins,OutputStream outs)
throws IOException {
synchronized (ins) {
synchronized (outs) {
System.err.println("writing nokia6600");
byte[] buf = new byte[256];
while (true) {
int br = ins.read(buf);
if (br == -1) break;
outs.write(buf,0,br);
}
}
}
}//end scopy
public static void main(String[] args) {
try {
int port = Integer.parseInt(args[0]); // The port to
listen on
ServerSocket ss = new ServerSocket(port); // Create a socket
to listen
for(;;) { // Loop forever
Socket client = ss.accept(); // Wait for a
connection
ClientThread t = new ClientThread(client); // A thread to
handle it
t.start(); // Start the thread
running
} // Loop again
}
catch (Exception e) {
System.err.println(e.getMessage());
System.err.println("Usage: java HttpMirror <port>");
}
}

static class ClientThread extends Thread {
Socket client;
ClientThread(Socket client) { this.client = client; }
public void run() {
System.err.println("server start");
try {
// Get streams to talk to the client
BufferedReader in = new BufferedReader(new
InputStreamReader(client.getInputStream()));
PrintWriter out = new PrintWriter(new
OutputStreamWriter(client.getOutputStream()));


String line;
while((line = in.readLine()) != null) {
System.err.println(line);
if (line.length() == 0) break;
//



out.println(line);
}

out.print("HTTP/1.1 200 OK\r\n");
out.print("Date: Wed, 15 Sep 2004 13:23:51 GMT\r\n");
out.print("Server: Apache/1.3.31 (Unix) PHP/4.3.8\r\n");
out.print("Expires: Wed, 15 Sep 2004 13:33:51 GMT \r\n");
out.print("Last-Modified: Tue, 14 Sep 2004 10:00:20 GMT \r\n");
out.print("Content-Length: (length of file which will be
transmitted)\r\n");
out.print("Content-Type: application/vnd.wap.xhtml+xml \r\n\r\n");

out.flush();

FileInputStream pw = new FileInputStream("testgoogle.html");
OutputStream nokia6600 = client.getOutputStream();
//client.getOutputStream();
scopy(pw,nokia6600);
System.err.println("nokia6600 is writing out");
pw.close();
nokia6600.close();

out.close();
in.close();
client.close();
}
catch (IOException e) { /* Ignore exceptions */ }
}
}
}



--------------------------------------------
--------------------------------------------
part 2:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<meta name="generator" content=
"HTML Tidy for Windows (vers 1st July 2004), see www.w3.org" />

<title>¤¸´¼¤j¾Ç -</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<meta http-equiv="Pragma" content="no-cache" />
<link href=
"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/nav.css"
type="text/css" rel="stylesheet" />
<script language="JavaScript1.2" src=
"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/main.js"
type="text/javascript">
</script>
<meta content="MSHTML 6.00.2800.1458" name="GENERATOR" />
</head>

<body text="#000000" bgcolor="#CDD397" leftmargin="0" topmargin=
"0">
<table height="100%" cellspacing="0" cellpadding="0" align=
"center" border="0">
<tbody>
<tr>
<td colspan="3">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="eng_line" align="right"><img height="18"
src=
"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/eng-title.gif"
width="260" /></td>
</tr>

<tr>
<td class="top_img"><img height="90" src=
"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/top-main-01.jpg"
width="800" usemap="#map" border="0" /><map name=
"Map" id="Map">
<area shape="circle" alt=
"¤¸´¼¤j¾Ç­º­¶"
coords="66,45,44" href=
"http://www.yzu.edu.tw/" />
</map></td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td class="left_bar" valign="top" align="middle">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="132">
<script language="JavaScript1.2" src=
"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/v-intra.js"
type="text/javascript">
</script>
</td>
</tr>

<tr>
<td align="middle">&nbsp;</td>
</tr><!-- 國家品質獎 -->

<tr>
<td align="middle"><object codebase=
"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
height="90" width="56" classid=
"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value=
"/nqa/images/nqa.swf" />
<param name="bgcolor" value="#B6BC82" />
<embed src="/nqa/images/nqa.swf" pluginspage=
"http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="56"
height="90" />
</object><br />
<a href=
"http://www.yzu.edu.tw/nqa/index.htm"><img
onmouseover="JavaScript: this.style.borderColor='#CDD397';"
style=
"BORDER-RIGHT: #b6bc82 1px solid; BORDER-TOP: #b6bc82
1px solid; BORDER-LEFT: #b6bc82 1px solid; BORDER-BOTTOM: #b6bc82 1px
solid"
onmouseout=
"JavaScript: this.style.borderColor='#B6BC82';"
alt="°ß¤@ºaÀò°ê®a«~½è¼úªº¤j¾Ç¡Ð¤¸´¼¤j¾Ç"
src=
"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/nqa-6.jpg"
border="0" /></a></td>
</tr><!-- 國家品質獎 -->

<tr>
<td align="middle">&nbsp;</td>
</tr>

<tr>
<td style="PADDING-TOP: 3px" align="middle">
<script language="JavaScript1.2" type=
"text/javascript">
//<![CDATA[
flashon();
//]]>
</script>
</td>
</tr>
</tbody>
</table>
</td>

<td class="main" valign="top" align="middle">
<table height="100%" cellspacing="0" cellpadding="0"
width="100%" border="0">
<tbody>
<tr>
<td valign="top" height="210">
<table height="100%" cellspacing="0" cellpadding=
"0" width="100%" border="0">
<tbody>
<tr>
<!-- 即時新聞(Begin)
-->

<td class="home_hot_simg" valign="top">
<a href=
"http://www.yzu.edu.tw/?news=040907002"><img
src="%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/040907002.jpg"
width="240" border="0" /></a></td>

<td valign="top">
<table height="100%" cellspacing="0"
cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td class="home_hot_title" height=
"25"><img height="21" src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/hot-news.gif"
width="69" /></td>
</tr>

<tr>
<td class="home_hot_cont" valign=
"top">
<table class="word10" height=
"100%" cellspacing="0"
cellpadding="0" width="100%"
border="0">
<tbody>
<tr>
<td class="hot_article"
align="middle"><a href=

"http://www.yzu.edu.tw/?news=040907002">

2004¦~¿U®Æ¹q¦À°ê»Ú¬ã°Q·|¦b¤¸´¼</a></td>
</tr>

<tr>
<td height="100%">
<p>

¿U®Æ¹q¦À¥Ñ©ó¨ä°ª®Ä²v§C¦Ã¬Vªº¯S©Ê¡A¤Îªñ¦~¨Ó§Þ³N³Ð·s¬ð¯}¡A¤w¦¨¬°¥»¥@¬ö¤½»{ªº·s¯à·½
#172;ì§Þ¡C¥xÆW¥Ø«e¬ã¨s³æ¦ì¡B¾Ç³N¬É»P²£·~¬É¥¿¿n·¥§ë¤J¬ãµo»P¥Í²£¡A³vº¥§Î¦¨¿U®Æ¹q¦À¬ãµo»E&#18
;¨¤§Âú«¬¡C¥»®Õ§Æ±æÂǦ¹¬ã°Q·|¤§Á|¿ì¡A¶i¦æ°ê¤º¥~¬ãµo¦¨ªG¥æ¬y¡A«P¦¨¥xÆW¿U®Æ¹q¦À¬ãµo»P&#1
8;£·~¤§¶}©ñ¥­¥x(
<a href=

"http://www.yzu.edu.tw/?news=040907002">
¸Ô²Ó</a>
)</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td><!--
即時新聞(End) -->
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td valign="top">
<table height="100%" cellspacing="0" cellpadding=
"0" width="536" border="0">
<!-- 新聞與活動 -->

<tbody>
<tr>
<td valign="top">
<table cellspacing="0" cellpadding="0"
width="536" border="0">
<!-- Title(Begin) -->

<tbody>
<tr>
<td class="home_news_title">
<table cellspacing="0"
cellpadding="0" width="536"
border="0">
<tbody>
<tr>
<td align="left">
<img height="25" src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/news-events.gif"
width="86" /></td>
</tr>
</tbody>
</table>
</td>
</tr><!-- Title(End) -->

<tr>
<td class="home_news_cont" valign=
"top">
<table cellspacing="0"
cellpadding="0" width="488"
border="0">
<tbody>
<tr>
<td valign="top" align=
"middle">
<table class="home_news"
cellspacing="0"
cellpadding="2" width=
"488" border="0">
<!-- News List (Begin)
update on 20040918 -->

<tbody>
<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-n.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/22/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040922005">

¤j¾Ç®Õªø¡G¬°Á׶û

·|°jÁ×</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-n.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/22/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040922004">

µûŲ

À³±Ð¾Ç¬ã¨s¨Ã­«</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-n.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/22/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040922003">

¤¸´¼¤j¾Ç¬ãµo¦¨¤â¾÷¥Î¥Ò¾J¿U®Æ¹q¦À¥R¹q¾¹</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-n.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/22/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040922002">

¤¸´¼¤j¾Ç­p¹º¦¨¥ß±Ú¸s»P¦h¤¸¤å¤Æ¬ã¨s¤¤¤ß</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-a.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/22/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040922001">

¡y°O¾Ðªº·Å«×¢w¦Ñ·Ó¤ù®i¡z

¼x¥ó¬¡°Ê</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-n.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/17/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040917004">

¤¸´¼¤j¾Ç»P¥Ã¥­¤u°ÓÄâ¤â¦X§@¾Ç¥Í¹ê²ßÀ\ÆU</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-p.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/17/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040917003">

¤½¶O¯d¾Ç³Õ¤h«á¬ã¨s¤H­û¤Î¯d¾Ç¼ú¾Çª÷</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-p.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/15/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040915001">

931¾Ç´Á¾×­×¦W³æ¤Î¤H¤u¥[¿ï±ø¥ó¤½§i</a></td>
</tr>

<tr>
<td valign="top"
width="14">
<img height="11"
src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/r-n.gif"
width="11" align=
"absmiddle" /></td>

<td class=
"news_date" valign=
"top" width="64">
09/14/04</td>

<td width="410">
<a href=

"http://www.yzu.edu.tw/?news=040914001">

´N¾Ç§xÃø¤§¾Ç¥Í§U¾Çª÷¥Ó½Ð</a></td>
</tr>
<!-- News List (End) -->
</tbody>
</table>
</td>
</tr>
<!-- More News (Begin) -->

<tr>
<td class="more_news"
height="18"><a href=

"http://www.yzu.edu.tw/?news=more">

§ó¦h°T®§
...</a></td>
</tr><!-- More News (End) -->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td valign="bottom" align="middle" height=
"100%">
<table cellspacing="0" cellpadding="0"
width="490" border="0">
<tbody>
<tr>
<td class="home_down_link" width=
"37">&nbsp;</td>

<td class="home_down_link_dot"
width="16">&nbsp;</td>

<td width="64"><a href=

"http://www.yzu.edu.tw/bb/b01.htm"><img
onmouseover="this.src='/images/main/sec-item-1-h.gif';"
onmouseout=

"this.src='/images/main/sec-item-1.gif';"
height="25" src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/sec-item-1.gif"
width="64" border="0" /></a></td>

<td class="home_down_link_dot"
width="16">&nbsp;</td>

<td width="64"><a href=

"http://www.yzu.edu.tw/bb/qna.php?qna=aa">
<img onmouseover=

"this.src='/images/main/sec-item-2-h.gif';"
onmouseout=

"this.src='/images/main/sec-item-2.gif';"
height="25" src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/sec-item-2.gif"
width="64" border="0" /></a></td>

<td class="home_down_link_dot"
width="16">&nbsp;</td>

<td width="64"><a href=

"http://www.yzu.edu.tw/bb/contact.htm">
<img onmouseover=

"this.src='/images/main/sec-item-3-h.gif';"
onmouseout=

"this.src='/images/main/sec-item-3.gif';"
height="25" src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/sec-item-3.gif"
width="64" border="0" /></a></td>

<td class="home_down_link_dot"
width="16">&nbsp;</td>

<td width="64"><a href=

"http://www.yzu.edu.tw/bb/site_map.htm">
<img onmouseover=

"this.src='/images/main/sec-item-4-h.gif';"
onmouseout=

"this.src='/images/main/sec-item-4.gif';"
height="25" src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/sec-item-4.gif"
width="64" border="0" /></a></td>

<td class="home_down_link_dot"
width="16">&nbsp;</td>

<td width="64"><a href=

"http://www.yzu.edu.tw/search/index.asp">
<img onmouseover=

"this.src='/images/main/sec-item-5-h.gif';"
onmouseout=

"this.src='/images/main/sec-item-5.gif';"
height="25" src=

"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/sec-item-5.gif"
width="64" border="0" /></a></td>

<td class="home_down_link_dot"
width="16">&nbsp;</td>

<td class="home_down_link" width=
"37">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td class="copyright_home" valign="bottom"
align="middle">Copyright @ 2004
¤¸´¼¤j¾Ç
Yuan Ze

University&nbsp;&nbsp;•&nbsp;&nbsp;®ç¶é¿¤¤¤Ãc¥«
320
»·ªF¸ô135¸¹
- (03)4638800</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>

<td class="right_bar" valign="top" align="middle">
<table cellspacing="10" cellpadding="0" width="132"
border="0">
<tbody>
<tr>
<td>
<script language="JavaScript1.2" src=
"%C2%A4%C2%B8%C2%B4%C2%BC%C2%A4j%C2%BE%C3%87%20-.files/slide_img.js"
type="text/javascript">
</script>
</td>
</tr>

<tr>
<td>
<table class="link_tb" cellspacing="0"
cellpadding="0" width="112" border="0">
<tbody>
<tr>
<td class="link_tit" align="middle">

©Û¥Í±M°Ï</td>
</tr>

<tr>
<td class="link_in" align="middle">
<p><a href=

"http://www.yzu.edu.tw/rc/1/1.htm">¤j¾Ç³¡</a><br
/>

<a href=

"http://www.yzu.edu.tw/rc/2/1.htm">¬ã¨s©Ò</a><br
/>

<a href=

"http://www.yzu.edu.tw/rc/3/1.asp">±À¼s±Ð¨|</a><br
/>

<a href="http://univ.edu.tw/univ/yzu/"
target=

"_blank">¤j¾Ç³ÕÄý·|</a></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td>
<table class="link_tb" cellspacing="0"
cellpadding="0" width="112" border="0">
<tbody>
<tr>
<td class="link_tit" align="middle">

®Õ¤Í¶é¦a</td>
</tr>

<tr>
<td class="link_in" align="middle">
<p><a href=

"http://www.yzu.edu.tw/graduate/alu/free_mail.htm">

®Õ¤ÍªA°È</a><br />

<a href=

"http://www.yzu.edu.tw/graduate/alu/alu_report_1.htm">

®Õ¤Í°ÊºA</a></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td>
<table class="link_tb" cellspacing="0"
cellpadding="0" width="112" border="0">
<tbody>
<tr>
<td class="link_tit" align="middle">

¥Í¬¡¼s³õ</td>
</tr>

<tr>
<td class="link_in" align="middle">
<p><a href=

"http://www.yzu.edu.tw/arts/movie.htm">ÃÀ¤å¬¡°Ê</a><br
/>

<a href=

"http://www.yzu.edu.tw/life.htm">¥Í¬¡¸ê°T</a></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td>
<table class="link_tb" cellspacing="0"
cellpadding="0" width="112" border="0">
<tbody>
<tr>
<td class="link_tit" align="middle">
§Ö³t³sµ²</td>
</tr>

<tr>
<td class="link_in" align="middle">
<p><a href=

"http://www.yzu.edu.tw/bb/email.htm">¹q¤l¶l¥ó</a><br
/>

<a href=

"http://isdna1.yzu.edu.tw/stdsel/default.asp"
target=

"_blank">¿ï½Ò¨t²Î</a></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>

<tr>
<td class="bottom_bar" colspan="3">&nbsp;</td>
</tr>
</tbody>
</table>
</body>
</html>

--------------------------------------------

sorry that there are some Chinese characters.


Is there a good suggestion?

best wishes
 
M

mike

but I try the mime type: application/vnd.wap.xhtml+xml
and try to transmit the following XHTML file.
It is OK.My nokia 6600 can identify the XHTML file.
XHTML file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Formet HTML document</title>
</head>
<body>
<p>This used to be a HTML document, now it's valid XHTML!</p>
</body>
</html>
 
J

Johannes Koch

mike said:
but I try the mime type: application/vnd.wap.xhtml+xml
and try to transmit the following XHTML file.
It is OK.My nokia 6600 can identify the XHTML file.

1. In the XHTML file rejected by your phone, there may be
elements/attributes, that the phone does not understand; e.g. you used
the XHTML 'complex' table model, not the simpler model used in XHTML
Mobile or Basic. If you claim to use XHTML Mobile profile (by sending
this MIME type), you should only use elements from this XHTML profile.

2. Generally, you should use appropriate MIME types:
* application/xhtml+xml for XHTML (1.0, 1.1)
* application/vnd.wap.xhtml+xml only for XHTML Mobile Profile
 
M

mike

thank you,you post helps a lot.^_^
I will try your suggestions.

May god help you all.


best wishes
 
M

mike

regards,followings are my codes.
first I import the api.
You know,:),and then.

---------------------------------------------------------
import org.w3c.tidy.Tidy;

Tidy tidy = new Tidy();
tidy.setCharEncoding(4);
// tidy.setXmlTags(false);
System.out.println("tidy test");
//at input not XML
//tidy.setQuiet(true);
//tidy.setShowWarnings(true);
//tidy.setXmlOut(false);

tidy.setXHTML(true);
FileInputStream pw2 = new FileInputStream("page.txt");
FileOutputStream pw3 = new FileOutputStream("page2.txt");
tidy.parse(pw2,pw3);
pw2.close();
pw3.close();
---------------------------------------------------------
page.txt is HTML document input.
page2.txt is XHTML document output.
but my nokia6600 cannot identify the page2.txt.
Did I miss something important?
thank you.
best wishes
 
J

Johannes Koch

mike said:
regards,followings are my codes. [java code]
page.txt is HTML document input.
page2.txt is XHTML document output.
but my nokia6600 cannot identify the page2.txt.
Did I miss something important?

Your Nokia phone does not know, how the markup (HTML or XHTML) was
created (by Java, or ASP, or PHP, or ...). It's the output of your
programming code, _the markup_ ,that the phone refuses to render. Make
sure you only use markup the phone understands. AFAIK, Nokia provides
documentation for each type of mobile browser.
 
M

mike

regards:
thank you for your reply.^_^
I would like to ask what does "AFAIK" mean in easy English.
I cannot Look up "AFAIK" in my dictionary.>.<



You are right.I got the the nokia 6600 mobile profile at
http://nds.nokia.com/uaprof/N6600r100.xml

The nokia 6600 mobile profile describes what kind of tags the
nokia 6600 mobile browser supports.

I would like to find a "good parser" to parse the output of my
programming code.Is there a suggestion.



thank you
May god bless you all.
 

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

Forum statistics

Threads
473,998
Messages
2,570,242
Members
46,834
Latest member
vina0631

Latest Threads

Top