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

Non-core media type stylesheet check ignores fallbacks (ePub Check 3.0.1) #271

Closed
rdeltour opened this issue Oct 15, 2013 · 18 comments
Closed
Assignees
Labels
status: needs review Needs to be reviewed by a team member before further processing type: bug The issue describes a bug
Milestone

Comments

@rdeltour
Copy link
Member

From sunny.ab...@gmail.com on May 28, 2013 11:35:46

PROBLEM: The new ePub check software Epub Check 3.0.1 throws the following error while validating ePub files.

non-standard stylesheet resource 'OPS/page-template.xpgt' of type 'application/vnd.adobe-page-template+xml’. A fallback must be specified.

Please advice how to overcome this.

Thanks,
Sunny Abraham

Original issue: http://code.google.com/p/epubcheck/issues/detail?id=271

@rdeltour
Copy link
Member Author

From settus...@gmail.com on June 03, 2013 01:26:48

I have the same issue in new Epub Check 3.0.1. Please help me to resolve this error.

Thank You,
Sarfudeen

@rdeltour
Copy link
Member Author

From alan.tre...@gmail.com on June 06, 2013 04:56:58

Check out the change between https://code.google.com/p/epubcheck/source/browse/tags/3.0/src/main/java/com/adobe/epubcheck/opf/XRefChecker.java and https://code.google.com/p/epubcheck/source/browse/tags/3.0.1/src/main/java/com/adobe/epubcheck/opf/XRefChecker.java around line 290 starting case RT_STYLESHEET, there was code musing like this

// if mimeType is null, we should have reported an error already

// The original code is below, but we were never collecting
// references to RT_STYLESHEETs; now we are.
// Implementations are allowed to process any stylesheet
// language they desire; so this is clearly not an
// error. Making this a warning with "(might be ignored)" could
// be okay. However, related, the OPF
// Checker currently looks at only the <spine> to make sure
// referneced items have appropiate fallbacks;
// it should really be checking the <manifest>. If this was
// corrected, these alternate stylesheet
// items (with non-blessed MIME types) would likely get flagged
// as missing requried fallbacks. Flagging
// this during manifest processing seems the right choice, so,
// commenting out for now. [GC 11/15/09]

and then in 3.0.1 these reservations seem to have been quelled and the code has been uncommented and updated. However we're getting errors flagged eg when you have things like this in the XHTML

<link rel="stylesheet" type="text/css" href="../style/epub_css_r1.css"/>
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="../page-template.xpgt"/>


and that SEEMS like it should be ok. It doesn't look like an error - there is a fallback CSS stylesheet of the right type first, and then another for alternative devices (ADE in this instance)

@rdeltour
Copy link
Member Author

From richa...@gmail.com on June 07, 2013 03:30:55

PROBLEM:

The new ePub check software Epub Check 3.0.1 throws the following error while validating ePub files.

non-standard stylesheet resource 'OPS/page-template.xpgt' of type 'application/vnd.adobe-page-template+xml’. A fallback must be specified.

Please advice how to overcome this.

@rdeltour
Copy link
Member Author

From tobias.c...@gmail.com on June 07, 2013 14:02:39

This new ERROR is related to issue 244 which was closed by revision r455 .

For ePub 3.0 this error is absolutely correct. the adobe page template extension isn't an epub 3.0 core media type. and non-core media types are only allowed if fallbacks are provided. Fallbacks must be declared in the OPF file like this:

<item id="css" href="epub_css_r1.css" media-type="text/css" />
<item id="xpgt" href="page-template.xpgt" media-type="application/vnd.adobe-page-template+xml" fallback="css"/>

You probably haven't done this in your OPF file...

@rdeltour
Copy link
Member Author

From tobias.c...@gmail.com on June 07, 2013 15:02:21

This said, I just found out that a correct fallback declaration in OPF is ignored or not checked. So it seems that with r455 we introduced a new bug...

Therefore I'm going to rename this issue to better reflect the problem.

Attached EPUB should be valid as the fallback for XPGT pageTemplate is correctly declared.

Summary: Non-core media type stylesheet check ignores fallbacks (ePub Check 3.0.1) (was: Error for XPGT file while validating ePub 3.0 using the new epubcheck software (ePub Check 3.0.1) )
Status: Accepted
Cc: rdeltour@gmail.com

Attachment: lorem-css-correctFallback.epub

@rdeltour
Copy link
Member Author

From richa...@gmail.com on June 08, 2013 03:52:07

Hi,
thank you for the response. I validated your file through epubcheck-3.0.1 validator it gives the same error.

ERROR: lorem-css-correctFallback.epub/EPUB/lorem.xhtml(7,100): non-standard stylesheet resource 'EPUB/page-template.xpgt' of type 'application/vnd.adobe-page-template+xml'. A fallback must be specified.

Check finished with warnings or errors

Please help us to correct this issue.

@rdeltour
Copy link
Member Author

From tobias.c...@gmail.com on June 08, 2013 03:57:26

Please read my comment carefully. The attached file SHOULD be valid, but isn't! Because 3.0.1 has a bug...
You can't do anything about it - the epubcheck team has to fix the issue with next 3.0.2 release...

@rdeltour
Copy link
Member Author

From tobias.c...@gmail.com on June 08, 2013 03:59:49

Issue 281 has been merged into this issue.

@rdeltour
Copy link
Member Author

From settus...@gmail.com on June 08, 2013 04:05:37

Thank you for the reply.

Yes, the given EPUB file also showing the same error has already reported.

Please fix this bug and release new version of epubcheck. Thank you.

@rdeltour
Copy link
Member Author

From alan.tre...@gmail.com on June 10, 2013 03:21:57

Thanks Tobias - that is exactly what I was looking for.

@rdeltour
Copy link
Member Author

From tobias.c...@gmail.com on June 12, 2013 14:43:52

Issue 283 has been merged into this issue.

@rdeltour
Copy link
Member Author

From tobias.c...@gmail.com on June 23, 2013 05:23:35

Issue 285 has been merged into this issue.

@rdeltour
Copy link
Member Author

From kurinji...@gmail.com on August 03, 2013 07:02:54

Hai,

The new ePub check software Epub Check 3.0.1 throws the following error while validating ePub files.

non-standard stylesheet resource 'OEBPS/styles/page-template.xpgt' of type 'application/vnd.adobe-page-template+xml'. A fallback must be specified.

Thank you
Malar

@rdeltour
Copy link
Member Author

From jackscot...@gmail.com on August 28, 2013 03:07:51

When is version 3.0.2 due to be released with this bug fixed?

@rdeltour
Copy link
Member Author

From ramara...@gmail.com on October 08, 2013 23:44:31

PROBLEM:

The new ePub check software Epub Check 3.0.1 throws the following error while validating ePub files.

For the title, xxxxxxxxx, there are Epubcheck 3.0.1 errors.
Epubcheck Version 3.0.1

Validating against EPUB version 2.0
ERROR: /Desktop/xxxxxxxxx.epub/OEBPS/Cover.html(6,94): non-standard stylesheet resource 'OEBPS/page-template.xpgt' of type 'application/adobe-page-template+xml'. A fallback must be specified.

Please help us to correct this issue.

@rdeltour
Copy link
Member Author

From tobias.c...@gmail.com on October 09, 2013 00:24:37

Hi ramarajds,

there's nothing you can do about it. It's a bug in epubcheck 3.0.1 which has to be fixed...

Labels: Priority-High

@tofi86
Copy link
Collaborator

tofi86 commented Oct 17, 2013

@rdeltour, seeing your answer on the epubcheck mailing list, my "dirty fix" from commit 1a2a64f should be reverted.
I don't have too much time in th next days to get my hands on it - will you take care of it? you'll probably know best what to do since you introduced the changes...

@rdeltour
Copy link
Member Author

OK, I can take the ownership. I do not promise a fix in the next few days, but will do for 3.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs review Needs to be reviewed by a team member before further processing type: bug The issue describes a bug
Projects
None yet
Development

No branches or pull requests

2 participants