EUR full-term totals: 1 month €8.99 · 3 months €21.99 · 6 months €35.99 · 12 months €49.99 Compare plans →
Menu

Programme-guide engineering

Define an XMLTV import contract beyond XML validity

Plan an owned programme-guide importer with explicit channel mapping, time handling, missing-data rules and provenance.

An EPG is programme information

Define the local destination

A programme-guide importer transforms a source's records into your own catalogue model. Before writing that transformation, state what the destination requires: channel identity, start time, optional ending, title, language and source provenance. Do not assume a syntactically valid file satisfies every local requirement.

XMLTV's DTD describes its structure, but its comments identify relationships the DTD cannot fully enforce. Your importer therefore needs semantic checks as well as XML validation. Keep those local rules distinct from the format itself so a rejected record has an understandable reason.

Choose acceptance and quarantine rules

Decide how unknown channel references, missing optional data and contradictory times are handled. A rejected record can be preserved with a reason for review rather than silently dropped. A harmless absent description should not necessarily be treated like an unusable start time.

Keep the original source value beside the normalised value where practical. If an import changes a display title or resolves a time into a common timeline, that transformation should be inspectable. A later correction then has a source to compare rather than only a derived record.

Use an original pilot set

Prepare a small authorised fixture containing one ordinary programme, one unknown channel, one missing optional ending and one repeated record. Define the expected local result before running the importer. This is a proposed validation method; no importer was executed for this article.

For each case, distinguish acceptance, warning, quarantine and rejection. The same policy should apply consistently across a whole feed. If a source-specific exception is needed, document its scope and evidence rather than hiding it in a title-matching shortcut.

Publish a traceable guide revision

Give each import a source identifier, retrieval time, transformation version and result counts. Keep the original feed only for the retention period appropriate to the authorised data workflow. Avoid exposing private retrieval credentials in diagnostic reports.

Review the final display with a small set of known programme records and their intended times. Successful ingestion is not proof that the live channel carries the programme or that replay is available. The importer contract establishes how schedule information was handled, with missing and inferred values clearly identified.

Questions answered

Does XML validation guarantee correct channel mapping?

No. Structural validity and the destination's channel relationship need separate checks.

Should every missing optional field reject a programme?

Choose and document the local requirement. Optional metadata can often remain explicitly unknown.

Sources & further reading

Official references for the subjects discussed. Service terms and device software can change.

Your next step

A better setup starts with the right details.

Tell us your device model, viewing country and the programmes you want to discuss.

Talk on WhatsApp

+44 7532 814802

WhatsApp ↗↑ Top