WML与URL、程序段锚点
wml与url、程序段锚点
我们知道,环球网www(world wide web)是各种信息和设备的网络,为保证全球范围内的交互,人们制定了3种规范:其一,统一资源定位器url(uniform resource locators),提供所有网络资源的标准命名方式和定位方式;其二,标准协议,如http协议等,提供www资源的传输方式;其三,标准内容类型,如html、wml,提供www资源的内容形式及标准。wml沿用了这些规范,并扩大了url使用的范围。在wml中,不仅超链接、文件路径及文件名可以作为url处理,卡片名、宏变量名及各种内部资源名等也可作为url处理。
为此,wml改进了html命名资源位置的方式,采用程序段锚点(fragment anchor)的形式来处理wml程序中某段程序的定位。程序段锚点根据文档url规则进行定义,并按照程序段标识符前加井字号(#)的方式书写。使用程序段锚点,wml程序可以在同一卡片组中定位不同的卡片。如果在程序中不指定程序段,那么程序中引用的url名称则指整个卡片组,而且卡片组的名称同时也是本卡片组内的第一个卡片的名称。
例如,<go href=“#next_card“/>一句中的go元素就包含了一个url地址,该地址指定了同一卡片组中的另一个卡片。该此-us>url地址就包含了程序段标识符(#),“#next_card”就是一个程序段锚点。
wml还改进了相对url地址的用法。通过类似于相对路径的定位方式,实现相对url地址的处理。其格式为“/目录名/子目录名/…/文件名”,例如“/options/foo.wml ”就是一个相对url地址。
下面的实例就说明了相对url地址的用法。当用户选择执行go任务后,用户的浏览器就会定位并执行“/options/foo.wml”指定的网页:
<wml>
<card>
<do type=“options“ label=“options“>
<go> href=“/options/foo.wml“/>
label=“menu“=“font-size: 9pt; mso-bidi-font-size: 10.0pt“> </do>
<!-- rest of the card -->
</card>
</wml>
6楼 游客02023:
I do not even know how I ended up here, but I thought this post was great. I do not know who you are but definitely youre going to a famous blogger if you arent already Cheers!
Gafas Ray Ban Liquidacion07-05 02:51 5楼 游客02023:
Hey, My partner and i really like the actual internet-site!! That is certainly a great page. My family and i look forward to browsing a lot more exciting tips that you will be publishing within the forthcoming. We have discovered a great deal from this. Thx. -Hong Takes
longchamp online shop france07-05 02:51 4楼 游客01978:
Pretty good article. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way Ill be coming back and I hope you post again soon.
Gafas Sol Graduadas Curvas07-05 02:50 3楼 游客25412:
How is it that just anybody can write a web site and acquire as widespread as this? Its not like youve said something incredibly spectacular -more like youve painted a reasonably picture over a difficulty that you simply recognize nothing concerning I don’t want to sound mean, here. but do you truly suppose that you can escape with adding some pretty pictures and not genuinely say anything?
<a href=“http://excaliburcrossbow.com/Replica-Ray-Ban-Wayfarer-Sunglasses.html“ >Replica Ray Ban Wayfarer Sunglasses</a>
Replica Ray Ban Wayfarer Sunglasses06-19 12:43 2楼 游客25412:
Really clean website , thanks for this post.
<a href=“http://www.hannawinery.com/listinfo.php?pid=5220“ >Ray Ban Caravan Fake</a>
Ray Ban Caravan Fake06-19 12:43
发表评论