473,387 Members | 1,529 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,387 software developers and data experts.

"XHTML file" cannot be identified by nokia 66

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
Jul 20 '05 #1
10 3676
mike wrote:
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?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2
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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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%2 0-.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
Jul 20 '05 #3
mike wrote:
out.print("Content-Type: application/vnd.wap.xhtml+xml \r\n\r\n");
This is the MIME type for XHTML Mobile Profile.
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


This is a document type declaration for XHTML 1.0 Strict. This may be
the cause of the phone not accepting your code.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #4
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>
-------------------------------------------------------------------

I think maybe not the cause you suggested.
thank you,anyway
best wishes
Jul 20 '05 #5
mike wrote:
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
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #6
thank you,you post helps a lot.^_^
I will try your suggestions.

May god help you all.
best wishes
Jul 20 '05 #7
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
Jul 20 '05 #8
mike wrote:
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.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #9
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.
Jul 20 '05 #10
> I would like to ask what does "AFAIK" mean in easy English.
I cannot Look up "AFAIK" in my dictionary.>.<


Wikipedia gives the answers to such questions: http://en.wikipedia.org/wiki/AFAIK

btw. It surprises me to see so many non-native English speakers - that includes me - around here.

--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Ceterum censeo XML omnibus esse utendum
Jul 20 '05 #11

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

Similar topics

5
by: Andrzej Adam Filip | last post by:
Could you post some recommendation/advices which options should be used when using tidy to beautify xhtml ? It seems that "wrapped" xhtml produced by standards settings is not "liked" by some...
4
by: Dante | last post by:
Just a thought: what if you posted the W3C's "Valid XHTML" images on a webpage that doesn't even use XHTML? Or with a Valid CSS thing. What could the W3C do to you anyway? Maybe I'll do that just...
1
by: lucanos | last post by:
Hi All, I am toying with the idea of making a GreaseMonkey script, or similar (depending on how far out of my comfort zone I am willing to venture), which would translate a page automatically. ...
1
by: David | last post by:
I am working on a small web app. I attempted to copy it to the remote server via. the project/copy command and when I closed the project and attempted to reopen it, I get the error "project file...
2
by: phil | last post by:
Hi, I use aspnet 2.0 and i'm learning about data-bound controls. Sometimes, i get this error below, but the code of the aspx page is ok because i ran it several times. I use indeed a .mdf file...
1
by: weird0 | last post by:
System.Data.SqlClient.SqlException: An attempt to attach an auto- named database for file "Location" failed. A database with the same name exists, or specified file cannot be opened, or it is...
2
by: jjlagtap | last post by:
Hey everyone When I try to open a file i get the Exception listed below. The weird thing is it works when I run the web app locally and when i use a remote server and open a file on my computer....
1
by: jamesicus | last post by:
.......... just for curiosity? "real" XHTML served as content (MIME) type application/xhtml+xml will display in MSIE 6.0 release 2900 and 7.0 but they will not render xml content. However, MSIE...
11
by: MC | last post by:
I have a couple of customers who are using a program that deserializes an XML file, and on some files, the program fails to see the content of the file -- treats it as zero length and reports "root...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.