当前位置: 首页 > 网络学院 > XML相关教程 > WAP > WAP 基础知识

WAP
WAP 介绍
WAP 基础知识
WML 格式化
WML 链接
WML Input
WML 任务
WML 计时器
WML 变量
WML 实例
Validate WML
WML 参考
WML 字符实体
WML DTD

WAP 基础知识


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 670 ::
收藏到网摘: n/a

WAP Homepages
WAP主页

WAP homepages are not very different from HTML homepages. The markup language used for WAP is WML (Wireless Markup Language). WML uses tags - just like HTML - but the syntax is stricter and conforms to the XML 1.0 standard.
WAP主页与HTML主页并没有太大不同。WAP用的标记语言是WML(无线标记语言)WML使用标签——就像HTML一样-——但WAP的语法更严格并且遵守XML 1.0标准

WML pages have the extension *.WML, just like HTML pages have the extension *.HTML.
WML页面有扩展名*.WML,就像HTML页面用扩展名*.HTML.


WML Tags
WML标签

WML is mostly about text. Tags that would slow down the communication with handheld devices are not a part of the WML standard. The use of tables and images is strongly restricted. 
WML大部分是有关文本的 。会减缓与掌上部件通信的标签不是WML标准的一部分。表格和图像的使用是非常受到限制的。

Since WML is an XML application, all tags are case sensitive (<wml> is not the same as <WML>), and all tags must be properly closed.
因为WML是XML应用程序,所有的标签都是区分大小写的(<wml> 和 <WML>是不一样的),而且所有的标签必须合理地结尾


WML Decks and Cards

WML pages are called DECKS. They are constructed as a set of CARDS, related to each other with links. When a WML page is accessed from a mobile phone, all the cards in the page are downloaded from the WAP server. Navigation between the cards is done by the phone computer - inside the phone - without any extra access trips to the server.
WML页面被称为DECKS(一幅card)。它们由CARDS(一组card)构成,互相以链接相连。当在手机上访问一个WML页面时,页面所有的card都已从WAP服务器上下载下来了。在card与card之间的转换是由手机内置的手机计算机完成的,这无须访问服务器。


Example WML document:
WML文档例子:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="HTML" title="HTML Tutorial">
<p>
Our HTML Tutorial is an award winning
tutorial from W3Schools.
</p>
</card>
<card id="XML" title="XML Tutorial">
<p>
Our XML Tutorial is an award winning
tutorial from W3Schools.
</p>
</card>
</wml>

As you can see from the example, the WML document is an XML document. The DOCTYPE is defined to be wml, and the DTD is accessed at www.wapforum.org/DTD/wml_1.1.xml.
就如上述例子中所见,WML文档是一份XML文档。文档类型会定义为wml,DTD可以在这找到:www.wapforum.org/DTD/wml_1.1.xml.

The document content is inside the <wml>...</wml> tags. Each card in the document is inside <card>...</card> tags, and actual paragraphs are inside <p>...</p> tags. Each card element has an id and a title.
文档内容包含在<wml>...</wml>标签里。文档中的每张“card”都在<card>...</card>标签里,当前的段落都在<p>...</p>标签里。每张card元素都有一个ID和一个标题

评论 (0) All

登陆 | 还没注册?