Skip Headers

Oracle Application Server Wireless Developer's Guide
10g (9.0.4)

Part Number B10948-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

A
XHTML Modules Supported

This appendix contains information about XHTML modules supported, and their capabilities. Topics include:

A.1 Structure Module

The Structure module in XHTML defines the following elements:

A.2 Text Module

The Text module in XHTML defines the following elements:

A.3 HyperText Module

The HyperText module in XHTML defines the following elements:

A.3.1 Example Using the Rel Attribute


<a href="mypage.jsp" rel="Next Maxage-0 Maxstale-5 Fetchtimeout-2">Link</a>

href supports the following protocols:

To embed Grammar for Links (for Voice interface), <object> module will be used.

A.4 List Module

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.

A.4.1 Example of a Nested Navigation List

<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>).

A.5 Presentation Module

OracleAS Wireless supports the following elements defined in XHTML Presentation module:

A.6 Object Module

The Object module in XHTML defines the following elements:

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>

A.7 Embedding Images

<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>


Note:

If none of the images are supported by the device, OracleAS Wireless tries to adapt the image based on the supported formats for a device and its width and height. It is recommended (and a good practice) to specify <object> width and height (using CSS width and height) in percentages, rather than absolute widths and heights, enabling better and consistent image adaptation.


A.8 Embedding Audio

<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>


Note:

The media-type (type attribute) does not identify the exact format of the audio file. <param> element is used to identify the format. To identify the audio format, use <param> element with name="format" and the value containing the audio format. Also, when embedding audio, parameters can be supplied for format, fetchhint, fetchtimeout, maxage, maxstale and cache using <param> element.


A.9 Embedding Voice and DTMF Grammar

<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"


A.10 Using <param>

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:

A.11 Basic Tables Module

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

A.12 Meta Information Module

The Meta Information Module in XHTML defines the following elements:

OracleAS Wireless supports a special <meta> for the following:

A.13 Style Sheet Module

The Style Sheet Module in XHTML defines the following element:

A.14 Style Attribute Module

The Style Attribute Module defines the style attribute. The style attribute specifies the CSS style rules for the a given element.

A.15 Link Module

The Link Module in XHTML defines the following element:

A.16 OracleAS Wireless MXML Media Attribute Module

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.


Note:

mxml:media merely affects the rendering. It does not remove the element from the document, hence specifying mxml:media on elements that declare event handlers/observers still remain as part of the document and are registered with the Events implementation irrespective of the value in mxml:media attribute. mxml:media must be thought of as shortcut that specifies the 'style="display: none"' CSS property for the current element where the current media (and media features) do not match those specified in the mxml:media attribute.


A.17 Speech Recognition Grammar Module

The Speech Recognition Grammar Module defines the following element:

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>

Go to previous page Go to next page
Oracle
Copyright © 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index