×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    3

    DTD WML2 vs XHTML?

    I'm very new to WAP programming. I need to make a PHP generated WAP 2 (stylesheets) page so I went through few tutorials, but even though that my page seems to be "valid" (W3), it doesn't appear on any of my mobile phones.

    I was looking for the reason and so far I read smth about XHTML. Why is the WML2 DTD not supported and why do I have to use XHTML DTD? (do I?)

    link: http://partyyes.sk/omegawap2/

    code:
    Code:
    <?
    header("content-type: text/vnd.wap.wml;charset=UTF-8");
    echo '<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD WML 2.0//EN"
    "http://www.wapforum.org/dtd/wml20-flat.dtd">
    <html xmlns:wml="http://www.wapforum.org/2001/wml" xmlns="http://www.w3.org/1999/xhtml" version="-//WAPFORUM//DTD WML 2.0//EN">
     <head>
      <title>Omega on WAP 2.0</title>
     </head>
     <wml:card id="aboutus" title="Omega on WAP 2.0">
      <p>
     Profiles:<br/><br/>
      - <a href="./month.php">monthly</a><br/>
      - <a href="./week.php">weekly</a><br/>
      - <a href="./day.php">daily</a><br/>
      </p>
      <p><br/><br/>this is a test:<br/><big>big text</big><br/>normal text<br/><small>small text</small>
      </p>
     </wml:card>
    </html>
    ';
    ?>
    (ofc there's no need for PHP yet, but there'll be and i was wondering if my problem is not in the PHP header)

    Any help is very appreciate. Thanks for you time.

    - milan orszagh

  2. #2
    Registered User
    Join Date
    Jun 2004
    Location
    HEL
    Posts
    36

    Re: DTD WML2 vs XHTML?

    It doesn't show 'cos you have incorrectly nested elements in your code.
    Look at the validation results.
    You have a <br /> and some text that are outwith containers.
    That will cause the page to break on some devices for sure.
    Cheers,

    Jamie

    # Any form of employment is strictly prohibited ......

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    3

    Re: DTD WML2 vs XHTML?

    I'm sorry the link is updated with new version, I was more refering to the code I posted. However I'm doing it in XHTML now and it works.

    Thanks anyways.

    - milan

  4. #4
    Registered User
    Join Date
    Jun 2006
    Posts
    4

    Post Re: DTD WML2 vs XHTML?

    Hi

    Your problem can be related to content types. you can use some code like this: (.net)

    MyTypes = lRequest.AcceptTypes
    If MyTypes Is Nothing Then
    'if no Content Types are sent it will automaticly go to text/html
    Else

    For Indx = 0 To MyTypes.GetUpperBound(0)
    If MyTypes(Indx) = "application/vnd.wap.xhtml+xml" Then
    found = True
    lResponse.ContentType = "application/vnd.wap.xhtml+xml"
    End If
    If MyTypes(Indx) = "application/xhtml+xml" Then
    found = True
    lResponse.ContentType = "application/xhtml+xml"
    End If

    Next Indx
    End If

    BR
    Daniel

Similar Threads

  1. A Jtidy and XHTML question
    By mikeliu1976 in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2004-09-30, 05:06
  2. Browser Emulator - xhtml rendered as text
    By papasosa in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2004-05-11, 16:38
  3. define xhtml as mime-type in tomcat (URGENT)
    By tserivdd in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2004-05-06, 13:17
  4. XHTML WAP gateway problem?
    By huffschmid in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2004-04-07, 17:14
  5. XHTML Query
    By saurabh_info in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2003-11-17, 14:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •