It is possible to nest an XDIME 2 document inside the body of another XDIME 2 document. The mcs:wml-target-card meta property can be used to target the nested document at its own WML card.
It is possible to nest an XDIME 2 document inside the body of another XDIME 2 document. The mcs:wml-target-card meta property can be used to target the nested document at its own WML card.
This is a low level capability that is NOT intended for general use. Please contact us for further information.
The meta property supports two values: 'false' and 'true'. The default value of 'false' indicates that the nested document is targeted at the same WML card as its containing document. The value of 'true' means that the nested document is targeted at its own WML card. Please note that the meta property can only be associated with a nested document and it can only be specified once within each nested document. In addition, it is only allowed in the head of a nested document and must have no about attribute. If the property is specified for a device for which MCS does not render WML, then it is a fatal error irrespective of its value.
If, when processing a nested document for a device for which MCS renders WML, the mcs:wml-target-card meta property is set to 'true', then MCS will add a new card element to the WML deck into which it will place the nested document and all its content including other nested documents that are not themselves targeted at their own cards. Please note that the card for the root document always comes first before any other card. The first card is the one that is displayed when the page is first loaded.
Navigation between the different cards can be provided using id attributes as fragment identifiers within an href attribute. Links can be specified inline in the page and/or using Navigation links.
Let's consider the following nested XDIME 2 document.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:mcs="http://www.volantis.com/xmlns/2006/01/xdime/mcs"
xmlns="http://www.w3.org/2002/06/xhtml2" id="card1">
<head>
<title>WML Target Card Example</title>
<!-- Navigation links to the cards, presentation is WML browser specific. -->
<link rel="section" href="#card1" title="Go to Card 1"/>
<link rel="section" href="#card2" title="Go to Card 2"/>
<link rel="section" href="#card3" title="Go to Card 3"/>
<link rel="section" href="#card4" title="Go to Card 4"/>
</head>
<body>
<!-- Inline navigation menu to the cards. -->
<nl>
<label/>
<li href="#card1">Go to Card 1</li>
<li href="#card2">Go to Card 2</li>
<li href="#card3">Go to Card 3</li>
<li href="#card4">Go to Card 4</li>
</nl>
<p id="abc">Some text before the nested document.</p>
<html id="card2">
<head>
<title>Card 2</title>
<meta property="mcs:wml-target-card" content="true"/>
</head>
<body>
<p id="xyz">Some text inside the nested document, before the nested nested document.</p>
<html id="card3">
<head>
<title>Card 3</title>
<meta property="mcs:wml-target-card" content="true"/>
</head>
<body>
<p>Some text inside the nested nested document.</p>
</body>
</html>
<p>Some text inside the nested document, after the nested nested document.</p>
</body>
</html>
<p id="qrs">Some text after the nested document.</p>
<html id="card4">
<head>
<title>Card 4</title>
<meta property="mcs:wml-target-card" content="true"/>
</head>
<body>
<p>Some text inside another nested document.</p>
</body>
</html>
</body>
</html>
Given the previous XDIME 2 input, the WML output would look like the following code. Please note that the output markup may vary across devices.
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<wml>
<template>
<do type="select" name="do1" label="Go to Card 1">
<go href="#card1"/>
</do>
<do type="select" name="do2" label="Go to Card 2">
<go href="#card2"/>
</do>
<do type="select" name="do3" label="Go to Card 3">
<go href="#card3"/>
</do>
<do type="select" name="do4" label="Go to Card 4">
<go href="#card4"/>
</do>
</template>
<card title="WML Target Card Example" id="card1">
<p>
<a href="#card1">Go to Card 1</a>
<br/>
<a href="#card2">Go to Card 2</a>
<br/>
<a href="#card3">Go to Card 3</a>
<br/>
<a href="#card4">Go to Card 4</a>
</p>
<p id="abc">Some text before the nested document.</p>
<p id="qrs">Some text after the nested document.</p>
</card>
<card title="Card 2" id="card2">
<p id="xyz">Some text inside the nested document, before the nested nested document.</p>
<p>Some text inside the nested document, after the nested nested document.</p>
</card>
<card title="Card 3" id="card3">
<p>Some text inside the nested nested document.</p>
</card>
<card title="Card 4" id="card4">
<p>Some text inside another nested document.</p>
</card>
</wml>
It is worth noting that the card elements are created based on information from the html elements. The id attribute of the card element is set from the id attribute of the html element. The title attribute of the card element is set from the contents of the title element in the head element of the associated html element.