New editorial edition, December 2026. This historical address is retained for existing links; the text below is newly written.
Understanding WML Deck Structure
A WML deck contains one or more cards. In the example below, each card has an id so a link can target it. A fragment such as href="#details" refers to the card with that id in the same deck; an id is needed for this link target, not a universal requirement that every card carry one.
In a native WAP user agent, clicking such a link triggers a transition to the new card, replacing the current view. However, when viewing the raw source code in a modern browser, these links appear as internal document fragments. To create a functional derivative reading copy, these fragments must be mapped to specific sections in an HTML document.
Mapping WML Cards to HTML Sections
A derivative HTML reading copy is not a full emulation of a WAP runtime; it will not execute WML variables, events, or complex forms. Instead, its purpose is to preserve the text and the logical flow of navigation. By converting each <card> into an HTML <section> or <div> with a matching 'id', the original anchor links remain functional as jump-links within the single HTML page.
Original WML example
Keep this source alongside the derivative. The XML declaration is the first line.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="start" title="Archive example">
<p>Choose a card: <a href="#details">Open details</a></p>
</card>
<card id="details" title="Details">
<p>This text belongs to the second card. <a href="#start">Back to start</a></p>
</card>
</wml>Conversion Comparison: WML Source vs. HTML Derivative
This HTML is an actual reading copy of the preceding WML example. The two links target real section IDs. It preserves text and jump navigation; it does not reproduce WML events, variables or runtime behaviour.
| WML Element (Source) | HTML Element (Derivative) | Navigation Target |
|---|---|---|
| <card id="start"> | <section id="start"> | Initial view |
| <card id="details"> | <section id="details"> | Secondary view |
| <a href="#details"> | <a href="#details"> | Fragment jump |
<!doctype html>
<html lang="en">
<head><meta charset="utf-8"><title>WML reading copy</title></head>
<body>
<section id="start"><h1>Archive example</h1>
<p>Choose a card: <a href="#details">Open details</a></p>
</section>
<section id="details"><h2>Details</h2>
<p>This text belongs to the second card. <a href="#start">Back to start</a></p>
</section>
</body>
</html>- Verify that every <card id="..."> in the WML source has a corresponding <section id="..."> in the HTML copy.
- Ensure the XML declaration and DOCTYPE are preserved in the source archive.
- Confirm that <a> tags using the #fragment syntax are not stripped during conversion.
- Check that the HTML derivative is treated as a single-page document rather than an attempt to emulate a multi-page WAP session.
To preserve WML navigation in an HTML archive, map each WML card ID to an HTML element ID, turning card transitions into standard document fragment jumps.