Oracle Application Server Wireless Developer's Guide 10g (9.0.4) Part Number B10948-01 |
|
This appendix contains information about XHTML modules supported, and their capabilities. Topics include:
The Structure module in XHTML defines the following elements:
<html>
-- OracleAS Wireless defines additional profile attribute. The profile attribute specifies document compliance to a specific XHTML profile. The profile values accepts URI List and must contain the following URI value: http://xmlns.oracle.com/ias/dtds/xhtml+xforms/0.9.0/1.0
<head>
<title>
<body>
The Text module in XHTML defines the following elements:
<div>
, <p>
<span>
, <br>
<address>
, <blockquote>
, <h1>
, <h2>
, <h3>
, <h4>
, <h5>
, <h6>
, <pre>
<abbr>
, <acronym>
, <cite>
, <code>
, <dfn>
, <em>
, <kbd>
, <q>
, <samp>
, <strong>
, <var>
The HyperText module in XHTML defines the following elements:
<a>
<a href="{instance('data')/links/url}">
The
rel attribute describes the relationship between the current document and the target resource (href). rel can accommodate multiple relationships; in such cases the values are space-separated. You can get a list of known rel types at: http://www.w3.org/TR/html4/types.html#type-links. OracleAS Wireless recognizes the following rel values:
next
--indicates that the href resource referenced could be the next document in the application, and browsers can use this to prefetch the document. A value of Next is used as a prefetch indicator for these resources (otherwise the resource will be fetched by the device only when activated by a user).
maxage
--a value added by OracleAS Wireless. The values indicate that the device/browser can use a document from its cache with an age that is less than the amount of time specified. The time is specified with maxage value using a dash (-) as a separator as in: rel="maxage-5"
(implies an age of 5 seconds). The unit of time for Maxage is in seconds. This is supported only on Voice interfaces that use a VoiceXML Gateway.
maxstale
--a value added by OracleAS Wireless. The values indicate the browser can use a document from its cache that has not exceeded expiration time + specified limit time. The time limit is specified with maxstale value using a dash (-) as a separator as in: rel="maxstale-5"
(implies the browser can accept stale documents, and has not be stale for more than 5 seconds). The unit of time for maxstale is in seconds. This is supported only on Voice interfaces that use a VoiceXML Gateway.
connecttimeout
--a value added by OracleAS Wireless. The values indicate to the browser a minimum time after which connect timeout can occur in the case of when an anchor invokes a telephony services such as: "tel:.."
. The time limit is specified with connect-timeout value using a dash (-) as a separator such as: rel="connecttimeout-5ms"
(implies that the browser can issue a timeout if the connection did not succeed after at least 5 milli seconds). The unit of time for connect-timeout is either s or ms (this units must be specified).
caching
--possible values fast and safe. This is supported only on Voice interfaces that a VoiceXML Gateway.
<a href="mypage.jsp" rel="Next Maxage-0 Maxstale-5 Fetchtimeout-2">Link</a>
href supports the following protocols:
HTTP
(http:// or https://)--industry-standard HTTP protocol
OMP
(omp://)--allows applications to link to services defined in OracleAS Wireless using a virtual URL
Mail To
(mailto:)--allows applications to invoke a mail application (if supported by the target device)
Tel To
(tel:)--allows applications to invoke a phone application (if supported by the target device)
To embed Grammar for Links (for Voice interface), <object>
module will be used.
The List module in XHTML defines the following elements:
Navigation List (nl
) is part of the XHTML 2.0 specification (http://www.w3.org/tr/xhtml20). Navigation lists are to be used to define a navigation menu. Each Navigation list supports one <name>
element and <li>
elements for each menu item. Navigation list can be nested; an <li>
element can contain another navigation list.
Each menu item in a Navigation list is defined by an <li>
element, and <li>
elements have an href attribute (and other linking attributes such as type, rel and others as defined by <a>
element). The contents of an <li>
element, presented as a menu item in the menu, when selected, the link defined by the href attribute is followed.
The navigation list item <li>
supports href, rel and type (content type) attributes. (See <a>
above for details on rel and type attributes). To define Voice Grammar for a navigation list <object>
module must be used within the content model of <li>
element.
<nl>
<name>Contents</name> <li href="/link1">Item 1</li> <li> <nl> <name>Nested Menu List</name> <li href="sub1">Sub List Item 1</li> <li href="sub2">Sub List Item 2</li> </nl> </li> <li href="#conformance>Conformance</li> </nl>
When Nested Navigation lists are nested (<nl>
within an <li>
), only the nested navigation list is presented (ignoring all other elements with the same <li>
).
OracleAS Wireless supports the following elements defined in XHTML Presentation module:
The Object module in XHTML defines the following elements:
<object>
--Attributes declare, name, usemap and standby are not supported by OracleAS Wireless. The data attribute supports the use of attribute value templates as defined in <a>
element. Object element is used for embedding external content including images, audio or other embedded content such as Applets or Flash (if the target device supports such content). The Objects tag can contain HTML markup. The semantics of <object>
requires that the embedded markup (within the <object>
) is rendered if the device's user agent does not recognize the object's type or the user agent cannot render the <object>
. Objects can be nested, and the same semantics apply to any nested <object>
s.
In the following example, the markup contained in the <object>
tag is rendered when the target user agent does not support images.
<object data="myimage.jpg" type="image/jpeg"> <strong>Images</strong> are <em>not</em> supported by your device </object>
<object>
element must be used to embed images in a document. The data attribute of <object>
point to a URI where the image resource resides while the type specifies the media type (mime-type) of the image.
Supporting multiple image formats for various devices can be done using nested <object>
s. In the following example, OracleAS Wireless renders the correct image for the current device request.
gif image, if gif not supported then bmp else wbmp
<object data="http://../myimage.gif" type="image/gif"> <!-- render "bmp" if "gif" not supported --> <object data="http://../myimage.bmp" type="image/bmp"> <!-- render "wbmp" if "bmp" not supported --> <object data="http://../myimage.wbmp" type="image/wbmp"> Your UA does not support any image format </object> </object> </object>
If none of the images are supported by the device, OracleAS Wireless tries to adapt the image provided in the top-level <object>
to the format supported by the device. The adaptation process affects both the image format and the image size based on the device/media properties. Developers may provide additional parameters that may affect the adaptation process.
Optional parameters that can be specified are adapt and notsize. Specifying a <param>
with the name adapt with the value attribute set to false will turn off the image adaptation on <object>
. Specifying a <param>
with the name adapt with a value attribute notsize will turn off size adaptation, while adapting only the format of the image.
Note: If the original image is small enough to fit in the screen (or relevant frame where the object occurs), the size is unchanged by default. |
Here is an example that turns off any auto adaptation of the image:
<!-- Turn of auto adaptation, using <param> element --> <object id=myid2" data="images/oralogo.gif" type="image/gif"> <param name="adapt" value="false" /> </object>
Here is an example that limits the auto adaptation to image format only:
<!-- Turn of auto size adaptation, using <param> element --> <object id=myid2" data="images/oralogo.gif" type="image/gif"> <param name="adapt" value="notsize" /> </object>
<object>
element must be used to embed audio content into a document. The data attribute of <object>
point to a URI where the audio resource resides while the type specifies the media-type of the image. Audio content can be used for both visual devices and aural (voice) devices. If a particular format is not supported by the Voice Gateway or Visual Browser, then the embedded audio markup is used to play text using TTS.
<object id="myid" data="myaudio.gif" type="audio/wav"> <div> <p>Audio is not supported by your UA<p> <p>This will played using TTS</p> </div> </object>
<object>
element must be used to embed voice grammar resources. The data attribute of <object>
point to the grammar resource while the type specifies grammar format.
Following is an example associating Voice Grammar with Link anchor (<a>
):
<a href="mypage.jsp"> My Home Page <object data="grammar.dat" type="application/srgs+xml"/> </a>
You can associate more than one grammar using multiple Objects:
<a href="mypage.jsp"> My Home Page <object data="grammar.dat" type="application/srgs+xml"/> <object data="#Grammar_in_head_1"" type="vnd.oracle.srgs+xmlapplication/srgs+xml"/> </a>
<object>
element can also use inline grammar. To embed inline Grammar, OracleAS Wireless allows <grammar>
element in the head section of the HTML element, and <object>
element can point to an inline grammar using a fragment URI (#id). The <grammar>
element (and its namespace) is as defined by the W3C Speech Recognition Grammar Specification: (http://www.w3.org/TR/speech-grammar/)
<head> <grammar xmlns="http://www.w3.org/2001/06/grammar" id="grammar_in_head_1"> ........ </grammar> <grammar xmlns="http://www.w3.org/2001/06/grammar" id="grammar_in_head_2"> ........ </grammar> </head>
Note:When embedding a grammar using
<object>
, grammar parameters can be supplied for scope, mode, root, version, weight, fetchhint, fetchtimeout, maxage, maxstale, caching using<param>
element.For more information on speech recognition, see Section A.17, "Speech Recognition Grammar Module"
Parameters for an <object>
can be provided using <param>
element. For example, <param>
element can be used to support prefetch, and use cached sources for Aural interface (such as audio or grammar resources). Following are some examples of using <param>
element:
<param name="fetchhint" value="prefetch"/>
<param name="maxage" value="5"/> <param name="maxstale" value="5"/>
The Basic tables module in XHTML defines the following elements
Nested tables are illegal (XHTML Basic Tables defines this restriction). It is also recommended to use tables for presenting tabular data only. Do not use tables for presentation as this will break the device independence model; use CSS properties for layout.
OracleAS Wireless does not support rowspan or colspan attributes
The Meta Information Module in XHTML defines the following elements:
<meta>
--expected to provide meta information about the document, though authors have used the <meta>
element for embedding HTTP protocol semantics. Using meta for http equivalents (such as refresh, expires, cache-control and others) may not produce a consistent result on all user agents/devices. Documents authored to be device-independent should not use <meta>
element as http equivalent. Sample values for meta are author, copyright, description, keywords, maintainer, robots, bookmark.
OracleAS Wireless supports a special <meta>
for the following:
<meta>
with name=" __ASYNC_NO_RESPONSE__"
The meta tag indicates to OracleAS Wireless Server that the response must not be forwarded to the device. This is valid only when the target device is messaging-based. Messaging protocol-based devices, sometimes do not expect a response for a request message. Since the application uses HTTP protocol, it is forced to generate a valid response stream. This <meta>
value allows the application to generate a response stream that is not forwarded to the device.
The Style Sheet Module in XHTML defines the following element:
<style>
--used to embed CSS style rules within an XHTML document. The type attribute must use text/css media type (mime-type).
The Style Attribute Module defines the style attribute. The style attribute specifies the CSS style rules for the a given element.
The Link Module in XHTML defines the following element:
<link>
element. To reference an external CSS style sheet, the author must specify both the type attribute (type="text/css"
) and rel (rel="stylesheet"
) attribute (if these attributes are missing or contain different values, OracleAS Wireless will ignore these external references).
The Media Attribute Module defines the media attribute. The media attribute is defined in the MXML namespace mxml:media
attribute (mxml is the namespace prefix for MXML namespace).
mxml:media
assigns a media (device and device features) display condition to an element. This a core attribute that specifies the target media (device and device features) on which the current element is displayed/rendered. mxml:media
supports the Media Query Syntax as defined in: (http://www.w3.org/TR/css3-mediaqueries/). For a list of media and media features supported, see the sections on embedding media-specific content.
The Speech Recognition Grammar Module defines the following element:
<grammar>
. The <grammar>
element has been added to the XHTML Schema, as a module, as defined by the XHTML Modularization specification.
OracleAS Wireless has added <grammar>
element as an XHTML module to support inline grammars for Voice devices. The <grammar>
element can occur in the head section of the XHTML document. Multiple grammars can be declared. In addition, the <grammar>
element can occur within the <extension>
element of the XForms UI Controls.
Elements such as <a>
, <li>
(within an <nl>
) or UI Controls can reference the <grammar>
s in the <head>
section using the <object>
element. The grammar defined in the head section can be referenced by <object>
using a document fragment identifier (#id). Here is an example of such a grammar, included in an XHTML document, that associates a grammar to a link (<a>
) element:
<html xmlns="http://www.w3.org/1999/html" xmnls:grammar="http://www.w3.org/2001/06/grammar" .....> <head> <meta name=".." content="..."/> <title>...</title <grammar id="g1" xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en" version="1.0" mode="voice"> <rule id="flight"> ... <ruleref uri="#city"/> </rule> <rule id="city"> <one-of> <item>New York</item> <item>Los Angeles</item> <item>Chicago</item> ... </one-of> </rule> ... </grammar> <grammar id="g2" xmlns="http://www.w3.org/2001/06/grammar" ....> another grammar </grammar> </head> <body> .... <a href="hello.jsp"> Hello <object data="#id_of_grammar_element_in_head_section" type="application/vnd.oracle.srgs+xml"> <param name="scope" value="dialog"/> .. <!-- all other attributes supported by <grammar> element as defined in VoiceXML--> <param name="....." value="...."> </object> .... </a> </body> </html>
|
![]() Copyright © 2003 Oracle Corporation. All Rights Reserved. |
|