Please note: Work on this specification is being continued in the W3C Compound Document Working Group (09. August 2005).
Current document: 05. November 2004 (14th update. ChangeLog at the end of this document.)
This document gives guidens on how to create combined markup documents for mobile devices,
based on XHTML Mobile Profile (XHTML-MP) and SVG Tiny (SVGT).
Combining these two technologies allows the creation of screenresolution-independent mobile content.
Dynamic markup generation, based on user agent identification, will not be required.
Instead, when creating combined markup, content providers will use a least common denominator approach.
This will allow them to provide content in static documents, by hosting it on a standard webserver.
Any device in the target device group will...
A conformance test suite for the following recommendations is available at http://lab.vodafone.com/xhtml-svgt11/index.xhtmlmp (URL points to mobile device markup).
<object> element, are rendered as icons (similar to animated GIF's, see section "1. SVGT in Icon Mode").
Icon mode SVGT objects do not support linking and zoom-and-pan
functionality and only limited interactivity (as described below in
1.4.3). ...so that the SVGT icon can be clicked on and brought to full view mode. If zoom-and-pan functionality is required then, the 'zoomAndPan="disable"' attribute should NOT have been set in the SVGT document. (SVG Example)<a href="bar.svg"> <object data="bar.svg" type="image/svg+xml" width="80" /> </a>
The XHTML browser will draw an outline for all objects wrapped by the anchor tag. The outline will be drawn using a default color. (SVG Example)<a href="http://live.vodafone.com/foo.html"> <object data="bar.svg" type="image/svg+xml" width="40%" /> </a>
<style type="text/css">
a.svglink:focus { outline: none }
</style>
<a href="foo.html" class="svglink">
<object data="triggered-animate.svg" type="image/svg+xml" width="40%" />
</a>
The ability to hide the default outline
visualisation creates the basis for content driven focus-highlighting
(see 1.4.3). Hiding the outline visualisation makes sense only, if the
SVG object itself takes care of visual feedback when it gains/looses
focus.
<svg> element of each SVGT document wrappped by the XHTML anchor tag, receiving focus. This applies to declarative animation:
<svg id="SVGRoot">
...
<rect ... >
<animate begin="SVGRoot.focusin" ... />
<animate begin="SVGRoot.focusout" ... />
</rect>
...
</svg>
1. <param name="animation" value="play" /> (default)
This SVG object should play/animate all the time. focusin/focusout/activate events will be handled at any time.
2. <param name="animation" value="stop" />
This SVG object will only render the first frame for time zero (0) and then suspend indefinitely. This may be used for "static" SVG icons.
3. <param name="animation" value="onfocusevent" />
This SVG object will only render the first frame for time zero (0) and then suspend until it receives a focusin event. After receiving a focusin event the object will animate until a focusout event is received, when it will again suspend its timer and resume to a "paused" state.
<style type="text/css">
a.svglink:focus { outline: none }
</style>
<object type="image/svg+xml" data="header.svg" /> <!-- defaults to 'play' -->
<a href="foo1.html" class="svglink">
<object type="image/svg+xml" data="foo1.svg">
<param name="animation" value="onfocusevent" />
</object>
</a>
<a href="foo2.html" class="svglink">
<object type="image/svg+xml" data="foo2.svg">
<param name="animation" value="onfocusevent" />
</object>
</a>
Please note: In the SVG content, ...object element has width and/or height attributes set (through CSS or directly in XHTML), these values will be used.viewbox attributeswidth or height attributes is set, the user agent will automatically scale the other property proportionally, by inspecting the viewBox attributes of the <svg> root element (of the referenced SVGT document).
The use of the XHTML object-element width attribute set to "100%" (with no height attribute given)...
...is expected to become a common use case for small screen mobile devices, when creating banner-like objects, spreading over the full width of the screen (or a table cell), independent of the actual size of the screen (SVG Example).<object data="foo.svg" type="image/svg+xml" width="100%" />


<svg>
element defined with fixed (non relative) values. The display size of
such a SVGT document SHALL NOT be overridden by the XHTML object tag's width or height attributes (through CSS or XHTML). (XHTML Example)

<object> element, instead of using the <img> or <embed> element. XHTML authors may leverage the <object> element's fallback behavior in order to cater for cases where an SVGT renderer is not available on the device:
<object data="animated_image.svgz"
width="..."
height="..."
type="image/svg+xml">
<img src="static_image.png"
width="..."
height="..."
alt="..." />
</object>
<html>
<object data="foo.svgz"
style="position:absolute; left:20; top:20; width:50" />
<p style="position:absolute; left:20; top:20">
This text should appears in front of the SVG document, since it is defined below .
</p>
</html>

Content authors should also be aware that animation objects put right outside the viewbox (to be invisible) MAY STILL BE VISIBLE, depending on the aspect ratio of the destination rendering area. We suggest to make use of the visibility attribute to hide SVG objects when necessary.<svg viewBox="0 0 100 200"> <rect x="-1000" y="-1000" width="2100" height="2200" fill="red"/> ... </svg>
<svg viewBox="0 0 100 200">
<rect x="-50" y="0" width="50" height="50" fill="red" visibility="hidden">
<set attributeName="visibility" to="visible" ... />
...
</rect>
</svg>
<html>
<body style="background-image:url(background-noanim.svgz);background-attachment:fixed">
<p>This in foreground</p>
</body>
</html>
To be used as a scalable background image, the witdh and height attributes of the SVG root element should
not be set (or set to 100%).
It is also suggested for the "background-attachment" attribute of the XHTML CSS to be set to "fixed",
so that the fullview image does not scrol together with foreground elements.<svg ...> <text x="20" y="20" font-size="normal" fill="#000">Sample Text</text> </svg>
| SVG-Perf | description |
| 0 | none animating very low perf (Arm7 <30MHz) |
| 1* | none animating low perf (Arm7 <60MHz) |
| 2 | none animating high perf (Arm7 >=60MHz) |
| 3 | animating low perf (Arm7 >=90MHz) |
| 4 | animating mid perf (Arm7 >=120MHz / ~6600) |
| 5 | animating high perf (Arm7 >=120MHz + HW-accel) |
| 6 | animating high perf (low gradient/opacity) (Arm7 >=150MHz) |
| 7 | animating high perf (mid gradient/opacity) (Arm9 >=150MHz) |
| 8 | animating +gradient +opacity high perf (Arm9 >=180MHz) |
| 9 | animating +gradient +opacity very high perf (Arm9 >=180MHz + HW-accel) |
| 10+ | to be defined... |
"Accept: text/html, ..., image/svg+xml; ver=T1.1:T1.2; PI=5, image/png, ..."Rational: The plugin-nature of many existing SVG(T) rendering components and the fact that these plugins are (at least in part) user installable makes it almost impossible to propose a UAProf based solution for these values. Especially when considering the limitations of current plugin-interfaces. A plugin-host (browser) is however expected to permit the plugin to provide a MIME type string during initialization.
evalAccept(String accept)
{
// accept = "text/html, ..., image/svg+xml; ver=T1.1:T1.2; PI=5, image/png, ...";
System.out.println("Accept=["+accept+"]");
StringTokenizer st = new StringTokenizer(accept,",");
while(st.hasMoreTokens())
{
String mimeType = st.nextToken().trim();
if(mimeType.startsWith("image/svg+xml"))
{
StringTokenizer st2 = new StringTokenizer(mimeType,";");
while(st2.hasMoreTokens())
{
String str = st2.nextToken().trim();
if(str.startsWith("ver="))
{
StringTokenizer st3 = new StringTokenizer(str.substring(4),":");
while(st3.hasMoreTokens())
{
String version = st3.nextToken().trim();
System.out.println("ver="+version);
}
}
else
if(str.startsWith("PI="))
{
String pI = str.substring(3);
System.out.println("PI="+pI);
}
}
}
}
}
Accept=[text/html, ..., image/svg+xml; ver=T1.1:T1.2; PI=5, image/png, ...] ver=T1.1 ver=T1.2 PI=5
<svg> element of each SVGT document wrappped by the XHTML anchor tag, receiving focus."
Comments and Thanks
Please comment to timur.mehrvarz@vodafone.com
Special thanks to: Motorola, Adobe, Access, Sharp, Zoomon, BitFlash, SVG Consortium, BeatWare, NEC, Openwave, Opera, Antoine Quint, lars.piepel@vodafone.com, bruno.rodrigues@vodafone.com