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

epubcheck 4.2.0.-beta: SVG Xlink:href IRI #987

Closed
Doktorchen opened this issue Feb 28, 2019 · 1 comment
Closed

epubcheck 4.2.0.-beta: SVG Xlink:href IRI #987

Doktorchen opened this issue Feb 28, 2019 · 1 comment
Assignees
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Milestone

Comments

@Doktorchen
Copy link

epubcheck 4.2.0.-beta (and previous versions) indicate an error message for this SVG fragment:

"
<image xlink:href="Titelseite.svg#v1" width="2000" height="1600"
preserveAspectRatio="xMidYMid slice"/>
"
The IRI points to a view in the referenced file:
"
<view id="v1" viewBox="0 600 2000 2000" />
"
The error message goes like this: "ERROR(RSC-009): SVG.epub/Inhalt/preserveAspectRatio.xhtml(192,40): A fragment identifier should not be used with an img src attribute."

Well, it is not an img element at all and it has no src attribute. ;-)
If it means the XLink:href, SVG notes about this, that the value has to be an IRI
https://www.w3.org/TR/SVG11/linking.html#IRIReference
therefore Titelseite.svg#v1 is ok.

Even for HTML5:img src I could not find any indication, that 'Titelseite.svg#v1'
should be a problem.

Simlar problem for XLink:href of the SVG:a element:
"
<a xlink:href="#svgView(viewBox(1000,0,100,100))" xlink:title="Ansicht 2">
"
results in "ERROR(RSC-012): SVG.epub/Inhalt/view02.svg(18,75): Fragment identifier is not defined."

Because it is an svgView
https://www.w3.org/TR/SVG11/linking.html#SVGFragmentIdentifiers
this is ok as well, it references correctly an SVG fragment identifier.

@rdeltour rdeltour self-assigned this Feb 28, 2019
@rdeltour rdeltour added type: bug The issue describes a bug status: accepted Ready to be further processed labels Feb 28, 2019
@rdeltour rdeltour added this to the 4.2.0-RC milestone Feb 28, 2019
@rdeltour
Copy link
Member

Thanks for the report; this clearly looks like bugs.

rdeltour added a commit that referenced this issue Mar 8, 2019
Updates check `RSC-009`, which reports images defined as fragments:
- only report it if the image resource is not an SVG document.
- report it as a `WARNING` instead of an `ERROR`.
- improve the message to make it applicable to both HTML and SVG image
  elements.

Fix (part of) #987
rdeltour added a commit that referenced this issue Mar 8, 2019
Ignore SVG fragments matching the SVG view specification when
checking the existence of cross-reference anchors.

Fix (part of) #987
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Mar 8, 2019
rdeltour added a commit that referenced this issue Mar 10, 2019
Updates check `RSC-009`, which reports images defined as fragments:
- only report it if the image resource is not an SVG document.
- report it as a `WARNING` instead of an `ERROR`.
- improve the message to make it applicable to both HTML and SVG image
  elements.

Fix (part of) #987
rdeltour added a commit that referenced this issue Mar 10, 2019
Ignore SVG fragments matching the SVG view specification when
checking the existence of cross-reference anchors.

Fix (part of) #987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Projects
None yet
Development

No branches or pull requests

2 participants