rsrsss/xquery/opml/uk-highways.xqy

30 lines
870 B
Plaintext

import module namespace rsrsss = "https://envs.net/~lucidiot/rsrsss/rsrsss-functions" at "../functions.xqy";
rsrsss:make-opml(
"UK National Highways RSS feeds",
doc('https://nationalhighways.co.uk/travel-updates/traffic-information-rss-feeds/')//div[contains(@class, "container--section")]
! (
.//div[contains(@class, "accordion-card")]
! <outline text="{./header/a/normalize-space(text())}">
{
.//li/a[ends-with(@href, ".xml")]
! <outline
type="rss"
version="RSS"
text="{normalize-space(text())}"
xmlUrl="{resolve-uri(@href)}"
language="en-gb"
/>
}
</outline>,
.//div/h2/a
! <outline
type="rss"
version="RSS"
text="{normalize-space(text())}"
xmlUrl="{resolve-uri(@href)}"
language="en-gb"
/>
)
)