Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syndication support #78

Merged
merged 5 commits into from
May 25, 2019

Conversation

markpritchard
Copy link
Contributor

I wanted to add support for the RSS Syndication module (http://purl.org/rss/1.0/modules/syndication/) which provides the period at which feeds are updated.

The standard uses the sy local prefix, whereas many feeds use syn so this PR also introduces dynamic local prefixes for namespaces.

The read process statically maps element names to functionality, so
abstraction through the FromXml trait isn't required. The trait
complicates use of additional contextual data (such as namespace) in the
parsing implementation as required.

This commit removes the FromXml trait and exposes the parsing
implementations directly.
Documents are free to define a local prefix for a given namespace so
parsing should not hard-code a specific prefix (e.g. "dc" for Dublin
Core).

This commit records all configured namespaces during the initial parse
and uses these namespaces to instantiate the appropriate extensions as
they are encountered.
The RSS syndication module allows feeds to specify how often they are
updated as a hint to crawlers.

This commit adds support for this module as an extension.
@markpritchard
Copy link
Contributor Author

Hmm, that build passed when I built it locally (1.34.1). Will investigate!

Fixes for various issues reported by clippy.
UpdatePeriod missing serde derive.
Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Are any of these changes considered breaking changes? Doesn't look like it...

@markpritchard
Copy link
Contributor Author

markpritchard commented May 13, 2019 via email

@frewsxcv frewsxcv merged commit 546369b into rust-syndication:master May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants