[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TV] Schema



In list.comp.tv, Neil wrote:
>  
> I might have missed it, but is there a schema/DTD defined for the data
> files?

No, not currently. It's on the todo list. Simplistically, each XML file
defines one channel for one day.

The outermost tag, <channel> has the following attributes:
    id           The same as the filename (eg. 'bbc1' for 'bbc1.xml')
    source       The module used to generate this data
    date         The date the listings correspond to

There then follows a list of <programme> tags which MUST contain:
    <title>      The name of the programme
    <start>      The start time in the format (H)HMM

*One* of the following MUST also be present:
    <end>        The end time in the format (H)HMM
    <duration>   The length of the programme in minutes

The following tags SHOULD be present:
    <desc>       The programme description

The following tags MAY be present:
    <infourl>    A URL containing more information on the programme
    <type>       The genre of the programmes. Entries should, where
                 possible, use ones compatible with the DigiGuide
                 channel categories:
                    http://www.digiguide.com/dev/dgchan/categories.shtml

All the entries should be encoded with HTML::Entities so consider all
character entities to be those as defined by the W3C for HTML4/XHTML1.0.
If you'd like to turn that into a DTD or Schema, I'll be happy to host
it alongside the XML ;-)

If anyone's got any comments on the above, I'd love to hear them.

Cheers,

Andrew

-- 
Andrew Flegg -- mailto:andrew@xxxxxxxx  |  http://www.bleb.org/