Validator inappropriately constrains foreign markup in Atom [DuplicateElement and UndefinedElement]
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python, xml
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 135
- Fork
- 67
- Merge trung bình
- 2 ngày 51 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của w3c/feedvalidator
-
Feed validator crashes with "Memory error" when validating https://www.tidyverse.org/index.xmlĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
w3c/feedvalidator#204 ·
-
bug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 55/100
w3c/feedvalidator#198 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
w3c/feedvalidator#194 · 1 bình luận ·
-
403 Error for RSS feed URLĐang mởbug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
w3c/feedvalidator#192 ·
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 35/100
w3c/feedvalidator#191 ·
Tất cả issue của w3c/feedvalidator
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
TigreGotico/orthography2ipa#2950 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Unstructured-IO/unstructured#4876 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openfoodfacts/openfoodfacts-python#579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
fairagro/m4.2_sql_to_arc#388 ·
Maintainer thường phản hồi trong vòng 1 ngày