A Jtidy and XHTML question

Discussion in 'Java' started by mike, Sep 24, 2004.

  1. mike

    mike Guest

    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
     
    mike, Sep 24, 2004
    #1
    1. Advertising

  2. mike wrote:
    > 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

    --
    Thomas<dot>Fritsch<squiggle>ops<dot>de
     
    Thomas Fritsch, Sep 24, 2004
    #2
    1. Advertising

  3. mike

    mike Guest

    > The XHTML specification can tell you:
    > http://www.w3.org/TR/xhtml1/#media


    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.

    -------------------------------------------------------------------------
    thank you for your suggestion,anyway.

    -------------------------------------------------------------------------
    I would like to ask is there any constructive suggestion?


    thank you
     
    mike, Sep 24, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike

    A Jtidy question

    mike, Oct 26, 2004, in forum: Java
    Replies:
    2
    Views:
    450
  2. mike

    A Jtidy question

    mike, Oct 27, 2004, in forum: Java
    Replies:
    0
    Views:
    493
  3. mike
    Replies:
    0
    Views:
    431
  4. Replies:
    9
    Views:
    1,323
    Joe Kesselman
    Mar 24, 2006
  5. Replies:
    1
    Views:
    512
    Daniel Pitts
    Jul 23, 2007
Loading...

Share This Page