Validator inappropriately constrains foreign markup in Atom [DuplicateElement and UndefinedElement]
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- python, xml
- Ambito
- backend, testing-qa
Direzione di ricerca
Run the validator’s direct input box with the issue’s Atom feed, then trace the rules that validate atom:entry children and distinguish known Dublin Core elements from unknown foreign markup. Check both repeated dc:language and repeated dct:language cases. Done means these feeds no longer produce DuplicateElement or UndefinedElement errors, with regression coverage for both variants.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
According to section 4.1.2 of the Atom syndication format RFC, the atom:entry element allows zero or more "extension elements". The RFC defines "extension elements" in section 6.4 as "foreign markup", which it defines in section 6.1 as "markup from other vocabularies" i.e. not in the Atom namespace). In section 6.4, the RFC says in full:
Atom allows foreign markup anywhere in an Atom document, except where it is explicitly forbidden. Child elements of atom:entry, atom:feed, atom:source, and Person constructs are considered Metadata elements and are described below. Child elements of Person constructs are considered to apply to the construct. The role of other foreign markup is undefined by this specification.
However, when providing an Atom feed containing an atom:entry with more than one dc:language child element, the validator reports the error:
entry contains more than one dc:language [help]
with a link to the DuplicateElement help page.
If instead the Atom feed provided contains more than one dct:language child element, the validator reports the error:
Undefined entry element: dcterms:language (2 occurrences) [help]
with a link to the [UndefinedElement] help page.
To Reproduce
To trigger the DuplicateElement error, paste the following feed into the direct input box on the page :
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<id>http://example.com/data.feed</id>
<title>Test feed</title>
<updated>2022-02-11T15:21:00Z</updated>
<link rel="self" href="http://example.com/data.feed"/>
<author><name>example.com</name></author>
<entry>
<id>http://example.com/item/1</id>
<title type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<span xml:lang="en">Test title</span> /
<span xml:lang="cy">Teitl enghreifftiol</span>
</div>
</title>
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<span xml:lang="en">Summary</span> /
<span xml:lang="cy">Crynodeb</span>
</div>
</summary>
<link rel="alternate" href="http://example.com/item/1.json" type="application/json"/>
<link rel="alternate" href="http://example.com/item/1.xml" type="application/xml"/>
<updated>2022-02-11T15:22:00Z</updated>
<dc:language>en</dc:language>
<dc:language>cy</dc:language>
</entry>
</feed>
To trigger the UndefinedElement.html error, delete both instances of dc:language in the above XML and substitute the below XML:
<dct:language>en</dct:language>
<dct:language>cy</dct:language>
Expected behavior
The feed validates if an atom:entry contains two or more dc:language or dct:language elements.
- Lingua principale
- Python
- Stelle
- 135
- Fork
- 67
- Merge medio
- 2g 51m
- PR unite (30g)
- 4
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di w3c/feedvalidator
-
Feed validator crashes with "Memory error" when validating https://www.tidyverse.org/index.xmlApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
w3c/feedvalidator#204 ·
-
bug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 55/100
w3c/feedvalidator#198 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
w3c/feedvalidator#194 · 1 commento ·
-
403 Error for RSS feed URLApertabug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
w3c/feedvalidator#192 ·
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 35/100
w3c/feedvalidator#191 ·
Tutte le issue di w3c/feedvalidator
Issue simili
-
accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
future-agi/future-agi#5274 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
GenericMappingTools/pygmt#5014 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG][Low–Medium] founder_numbers.py silently reads a SAFE discount or pool target given as a fraction (0.2) as 0.2%Forse già presa @sumitkhond111-del l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bmad-code-org/BMAD-METHOD#3358 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
open-mmlab/mmcv#3352 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
OpenGithubs/weekly#263 ·
I maintainer di solito rispondono entro 1 giorno