CARVIEW |
Select Language
HTTP/2 200
date: Tue, 15 Jul 2025 09:58:26 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/w3c/epubcheck.git
etag: W/"b459e54c5fb44fc5ace51b4ca03600d8"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=3xKTtRPXaNJw0k1TB0HolIox7rmMre7x7fR54EXVh6lArr%2BtED%2Bm%2FiduCzcQ%2B0vpye8ymxcdah2rlFwGk6ah80ng936IRYlBXpe3iZx8o7tA48JEw2v7GTJcQ%2BtmLfim1ykADx72I91212VXyurCKLksQnDmIA9lJQq%2BdY2sXJX%2F5tLxgyr%2FCBAws2k%2BksGyFSweqD6fkIZkvtSDkpQT%2BClLoOZ2eZNXEV7kY24s1hm6ubX3Q0JLULdK6K6IOLCa%2Fp0LSZfF1u1gAp3CAjgfEg%3D%3D--u18WPfV8ocI4wVuD--LxVzRbRQE4p8dF6%2Fs91wRA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.654671752.1752573505; Path=/; Domain=github.com; Expires=Wed, 15 Jul 2026 09:58:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 15 Jul 2026 09:58:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: DD68:37FF58:5F51B1:6B9BD0:68762641
feat: improve fallback detection check · w3c/epubcheck@545b7f7 · GitHub
Dismiss banner
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/api/EpubCheck.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/css/CSSHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/dict/SearchKeyMapHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/dtbook/DTBookHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/messages/MessageId.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/nav/NavHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/ncx/NCXHandler.java
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 418
Commit 545b7f7
committed
feat: improve fallback detection check
This commit updates fallback-related checks and refactors the code used
for checking references to publication resources.
The following checks are introduced or updated:
- `RSC-032` (new): reports foreign resources with no fallback used in
content documents. Replaces `MED-001`, `MED-002`, and `CSS-010`
- `MED-003` now reports when an `img` element child of a `picture` element
is not a core media type.
- `MED-001` is suppressed. It was used to report a video `poster` attribute
did not reference a core image media type. It is now reported as `RSC-032`.
- `MED-002` is suppressed. It was used to report HTML elements referencing
foreign resources without fallback. It is now reported as `RSC-032`.
- `CSS-010` is suppressed. It was used to report references to foreign
stylesheets with no fallback. It is now reported as `RSC-032`.
- `OPF_040` is now reported when the `fallback` attribute of a package
document `item` element does not points to an existing ID. This was
previously implemented as a Schematron check (`RSC-005`) in EPUB 3.x.
- `OPF-013` is now a warning. It is reported when a MIME type declared
inline in content (for instance with an HTML `type` attribute) does
not match the MIME type declared in the package document.
The code is refactored as follows:
- the reference/resource registry functionality of the `XRefChecker`
class is extracted to new top-level classes in the (new) package
`org.w3c.epubcheck.references`.
- `Resource` represents a publication resource
- `ResourceRegistry` is a registry of `Resource` instances
- `Reference` represents a reference (URL) used anywhere in content
- `ReferenceRegistry` is a registry of `Reference` instances
- `XRefChecker` is renamed to `ResourceReferencesChecker`.
- `ValidationContext` contains optional references to `ResourceRegistry`
and `ReferenceRegistry`.
- fallback chain resolution is now done in a new `FallbackChainResolver`
class, when building `OPFItem` instances from the builders created
when parsing the package document.
- `XMLHandler` has convenience methods used to register references
to the `ReferenceRegistry`.
Fix #1304, Fix #1298.1 parent fdf9b22 commit 545b7f7Copy full SHA for 545b7f7
File tree
Expand file treeCollapse file tree
351 files changed
+3065
-2960
lines changedFilter options
- src
- main
- java
- com/adobe/epubcheck
- api
- css
- dict
- dtbook
- messages
- nav
- ncx
- ocf
- opf
- ops
- overlay
- tool
- xml/handlers
- org/w3c/epubcheck
- constants
- core
- references
- url
- util/url
- resources/com/adobe/epubcheck
- messages
- schema/30
- test
- java/org/w3c/epubcheck
- test
- url
- resources
- epub2
- epub3
- 03-resources
- files
- content-xhtml-xpgt-implicit-fallback-valid/EPUB
- content-xhtml-xpgt-manifest-fallback-valid/EPUB
- content-xhtml-xpgt-no-fallback-valid/EPUB
- fallback-chain-circular-error
- EPUB
- META-INF
- fallback-chain-n-to-1-valid
- EPUB
- META-INF
- fallback-chain-waterfall-valid
- EPUB
- META-INF
- foreign-exempt-font-valid
- EPUB
- META-INF
- foreign-exempt-unused-valid
- EPUB
- META-INF
- foreign-exempt-xhtml-link-valid
- EPUB
- META-INF
- foreign-exempt-xhtml-link-xpgt-manifest-fallback-valid
- EPUB
- META-INF
- foreign-exempt-xhtml-link-xpgt-no-fallback-valid
- EPUB
- META-INF
- foreign-exempt-xhtml-track-valid
- EPUB
- META-INF
- foreign-exempt-xhtml-video-in-img-valid
- EPUB
- META-INF
- foreign-exempt-xhtml-video-valid
- EPUB
- META-INF
- foreign-xhtml-audio-in-video-no-fallback-error
- EPUB
- META-INF
- foreign-xhtml-audio-manifest-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-audio-no-fallback-error
- EPUB
- META-INF
- foreign-xhtml-audio-no-fallback-with-flow-content-error
- EPUB
- META-INF
- foreign-xhtml-audio-source-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-audio-source-no-fallback-error
- EPUB
- META-INF
- foreign-xhtml-audio-source-remote-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-embed-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-embed-no-fallback-error
- EPUB
- META-INF
- foreign-xhtml-img-manifest-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-img-src-no-manifest-fallback-error
- EPUB
- META-INF
- foreign-xhtml-img-srcset-manifest-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-input-image-no-fallback-error
- EPUB
- META-INF
- foreign-xhtml-math-altimg-no-fallback-error
- EPUB
- META-INF
- foreign-xhtml-object-intrinsic-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-object-no-fallback-error
- EPUB
- META-INF
- foreign-xhtml-picture-img-src-error
- EPUB
- META-INF
- foreign-xhtml-picture-img-srcset-error
- EPUB
- META-INF
- foreign-xhtml-picture-source-no-type-error
- EPUB
- META-INF
- foreign-xhtml-picture-source-with-type-valid
- EPUB
- META-INF
- foreign-xhtml-script-datablock-valid
- EPUB
- META-INF
- foreign-xhtml-video-poster-fallback-valid
- EPUB
- META-INF
- foreign-xhtml-video-poster-no-fallback-error
- EPUB
- META-INF
- type-mismatch-in-audio-warning
- EPUB
- META-INF
- type-mismatch-in-embed-warning
- EPUB
- META-INF
- type-mismatch-in-object-warning
- EPUB
- META-INF
- type-mismatch-in-picture-source-warning
- EPUB
- META-INF
- 04-ocf
- files
- url-xhtml-cite-missing-resource-error
- EPUB
- META-INF
- url-xhtml-iframe-missing-resource-error
- EPUB
- META-INF
- url-xhtml-track-missing-resource-error
- EPUB
- META-INF
- 05-package-document
- files/package-manifest-fallback-non-resolving-error/EPUB
- 06-content-document
- files
- content-xhtml-img-video-valid
- EPUB
- META-INF
- content-xhtml-link-fragment-after-object-valid/EPUB
- type-mismatch-in-audio-warning
- EPUB
- META-INF
- type-mismatch-in-object-warning
- EPUB
- META-INF
- type-mismatch-in-picture-source-warning
- EPUB
- META-INF
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
351 files changed
+3065
-2960
lines changed-566Lines changed: 0 additions & 566 deletions
This file was deleted.
-608Lines changed: 0 additions & 608 deletions
This file was deleted.
src/main/java/com/adobe/epubcheck/api/EpubCheck.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/api/EpubCheck.java+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 |
| - | |
| 35 | + | |
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
|
src/main/java/com/adobe/epubcheck/css/CSSHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/css/CSSHandler.java+10-12Lines changed: 10 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 |
| - | |
31 |
| - | |
32 | 31 |
| |
33 | 32 |
| |
34 | 33 |
| |
| |||
42 | 41 |
| |
43 | 42 |
| |
44 | 43 |
| |
45 |
| - | |
46 | 44 |
| |
47 | 45 |
| |
48 | 46 |
| |
| |||
69 | 67 |
| |
70 | 68 |
| |
71 | 69 |
| |
72 |
| - | |
73 | 70 |
| |
74 | 71 |
| |
75 | 72 |
| |
| |||
159 | 156 |
| |
160 | 157 |
| |
161 | 158 |
| |
162 |
| - | |
| 159 | + | |
163 | 160 |
| |
164 | 161 |
| |
165 | 162 |
| |
| |||
322 | 319 |
| |
323 | 320 |
| |
324 | 321 |
| |
325 |
| - | |
| 322 | + | |
326 | 323 |
| |
327 | 324 |
| |
328 |
| - | |
| 325 | + | |
329 | 326 |
| |
330 | 327 |
| |
331 | 328 |
| |
| |||
367 | 364 |
| |
368 | 365 |
| |
369 | 366 |
| |
370 |
| - | |
| 367 | + | |
371 | 368 |
| |
372 | 369 |
| |
373 | 370 |
| |
374 | 371 |
| |
375 |
| - | |
| 372 | + | |
| 373 | + | |
376 | 374 |
| |
377 | 375 |
| |
378 | 376 |
| |
| |||
386 | 384 |
| |
387 | 385 |
| |
388 | 386 |
| |
389 |
| - | |
| 387 | + | |
390 | 388 |
| |
391 |
| - | |
| 389 | + | |
392 | 390 |
| |
393 | 391 |
| |
394 | 392 |
| |
|
src/main/java/com/adobe/epubcheck/dict/SearchKeyMapHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/dict/SearchKeyMapHandler.java+3-5Lines changed: 3 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
| 3 | + | |
| 4 | + | |
3 | 5 |
| |
4 |
| - | |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
| |||
39 | 40 |
| |
40 | 41 |
| |
41 | 42 |
| |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
| 43 | + | |
46 | 44 |
| |
47 | 45 |
| |
48 | 46 |
|
src/main/java/com/adobe/epubcheck/dtbook/DTBookHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/dtbook/DTBookHandler.java+13-9Lines changed: 13 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
25 | 27 |
| |
26 | 28 |
| |
27 |
| - | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
37 |
| - | |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
43 | 42 |
| |
44 | 43 |
| |
45 | 44 |
| |
| |||
51 | 50 |
| |
52 | 51 |
| |
53 | 52 |
| |
54 |
| - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 |
| |
56 | 59 |
| |
57 | 60 |
| |
58 |
| - | |
| 61 | + | |
59 | 62 |
| |
60 | 63 |
| |
61 | 64 |
| |
| |||
68 | 71 |
| |
69 | 72 |
| |
70 | 73 |
| |
71 |
| - | |
72 |
| - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 |
| |
74 | 78 |
| |
75 | 79 |
| |
| |||
86 | 90 |
| |
87 | 91 |
| |
88 | 92 |
| |
89 |
| - | |
| 93 | + | |
90 | 94 |
| |
91 | 95 |
| |
92 | 96 |
| |
93 | 97 |
| |
94 |
| - | |
| 98 | + | |
95 | 99 |
| |
96 | 100 |
| |
97 | 101 |
| |
|
src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java+4-3Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
147 |
| - | |
148 |
| - | |
| 147 | + | |
| 148 | + | |
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
208 |
| - | |
| 208 | + | |
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
| |||
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
| 351 | + | |
351 | 352 |
| |
352 | 353 |
| |
353 | 354 |
| |
|
src/main/java/com/adobe/epubcheck/messages/MessageId.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/messages/MessageId.java+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
342 | 342 |
| |
343 | 343 |
| |
344 | 344 |
| |
| 345 | + | |
345 | 346 |
| |
346 | 347 |
| |
347 | 348 |
| |
|
src/main/java/com/adobe/epubcheck/nav/NavHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/nav/NavHandler.java+6-6Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| 6 | + | |
| 7 | + | |
6 | 8 |
| |
7 | 9 |
| |
8 |
| - | |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
| |||
78 | 79 |
| |
79 | 80 |
| |
80 | 81 |
| |
81 |
| - | |
| 82 | + | |
82 | 83 |
| |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
87 | 87 |
| |
88 | 88 |
| |
89 | 89 |
| |
|
src/main/java/com/adobe/epubcheck/ncx/NCXHandler.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/ncx/NCXHandler.java+3-4Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
25 | 27 |
| |
26 | 28 |
| |
27 |
| - | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
36 |
| - | |
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
44 | 43 |
| |
45 | 44 |
| |
46 | 45 |
| |
| |||
76 | 75 |
| |
77 | 76 |
| |
78 | 77 |
| |
79 |
| - | |
| 78 | + | |
80 | 79 |
| |
81 | 80 |
| |
82 | 81 |
| |
|
You can’t perform that action at this time.
0 commit comments