Till senaste kommentaren

This feed does not validate using W3C feed validator

Hi

I'm using the W3C feed validator but noticed that the example given (Enklare RSS-exempel med två artiklar från "Dagens press" (fiktivt exempel som XML) doesn't validate in there:

This feed does not validate.

line 22, column 0: Undefined item element: dcterms:publisher (2 occurrences) [help]

dcterms:publisherhttp://id.kb.se/organisations/SE9020043619</dcterms:publi ...

line 25, column 0: Undefined item element: dcterms:format (2 occurrences) [help]

dcterms:formattext/html/dcterms:format

line 40, column 0: Undefined item element: dcterms:creator [help]

dcterms:creatorAndersson, Sven/dcterms:creator

Changing the namespace from dcterms to dc (e.g. dcterms:publisher to dc:publisher fixes one problem but I wonder whether it is the correct approach.

/Michael

Kommentarer

  • The W3C Validator doesn't seem to interpret the namespace declarations in the beginning of the file (xmlns:dcterms="http://purl.org/dc/terms/").
    The format should be RSS 2.0 with the addition of some elements from MediaRSS 1.5.0 (http://search.yahoo.com/mrss/) and Dublin Core DCMI Metadata Terms (http://purl.org/dc/terms/). You should use rss_kbse.xsd (found here http://www.kb.se/namespace/rss/index.html) for validation.

    Kungliga biblioteket
  • Hi Daniel

    thanks for your quick reply.

    I am now testing against the xsd files using xmllint.

    Running it I get these schema parse errors:

    xmllint --noout --schema rss_kbse.xsd dp-rssmallex.xml
    rss_kbse.xsd:76: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': Invalid value for maxOccurs (must be 0 or 1).
    ..56 more of these

    It this a problem of the schema or xmllint?

    /Michael

  • The XSD is XML Schema 1.1, and I'm afraid Xmllint doesn't support that.

    Kungliga biblioteket
  • Hi Daniel,

    thanks for your answer.

    I've found this to work quite well for 1.1 https://jeszysblog.wordpress.com/2012/09/27/fre...

    I have a first basic version of my feed ready. How do I go about having this tested and accepted by KB? Does the publisher have to register first before I can get in touch with you?

    Thanks,

    /Michael

  • You can e-mail it to me, and I can take a look at it. daniel.jansson[at]kb.se

    But the publisher has to register themselves to set up an account for the deliveries, but in the registration form they can assign you as the technical contact.

    Kungliga biblioteket

Kommentera eller skriv ett nytt inlägg

Ditt namn och inlägg kan ses av alla. Din e-post och ditt telefonnummer visas aldrig publikt.