Dvb Html A New Standard Part 2
Posted on 14 Jul 2002
by Mark Bolton (mark_bolton)
Rated 3.93 (Ratings: 3)
- More articles in Code
Document Type Definition and XML Namespace Requirements
As the DVB-HTML specification requires content to be validated against a specific DTD then any content to be displayed will have to provide the doctype declaration at the head of the document. This doctype is shown below:
<! DOCTYPE html PUBLIC "-// DVB//DTD XHTML DVB-HTML 1.0//EN" "http://www.dvb.org/mhp/dvb/dvbhtml-1-0.dtd">
Also as the namespace policies set down by the W3C are respected for XHTML the namespace link should also be included in the header information. Your document should now look like this:
><! DOCTYPE html PUBLIC "-// DVB//DTD XHTML DVB-HTML 1.0//EN""http://www.dvb.org/mhp/dvb/dvbhtml-1-0.dtd"><html xmlns="http://www.w3.org/xhtml"><head></head> <body> </body> </html>
DVB-HTML uses modules from the W3C XHTML Modularisation Recommendation and also adds a module to handle the specialist Intrinsic Events required for event handling.
The only module added is the DVB intrinsic events, this has been done to include three event handlers to the body and frame elements which are:
the additional module has been produced in accordance with the XML namespace defined by the DVB. These additional events have been added so that MHP can trigger other events.
In order to use the additional module and remove any potential conflicts with the W3C XML namespace a separate XML namespace is used by DVB-HTML and all commands are prefixed by dvbhtml:. An example of this is shown below:
><! DOCTYPE html PUBLIC "-// DVB//DTD XHTML DVB-HTML 1.0//EN""http://www.dvb.org/mhp/dvb/dvbhtml-1-0.dtd"><html xmlns="http://www.w3.org/xhtml"><head><script type="text/ecmascript" src="scriptname.js"></head> <body xmlns:dvbhtml="http://www.dvb.org/mhp"dvbhtml:ondvbdomstable="startevent()"> <!-- content here --></body> </html>
Our browser sniffing previously described in part 1 also enabled us to identify which modules would be supported, so at this stage we are ready to produce a document or application using the DVB-HTML standard.
In Part 3 of this series we take a look at the supported MIME media types and CSS for a DVB-MHP system.