amaresh19 / epubcheck

Automatically exported from code.google.com/p/epubcheck
MIT License
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 reported on code.google.com by sunny.ab...@gmail.com on 28 May 2013 at 9:35

GoogleCodeExporter commented 9 years ago
I have the same issue in new Epub Check 3.0.1. Please help me to resolve this 
error.

Thank You,
Sarfudeen

Original comment by settus...@gmail.com on 3 Jun 2013 at 8:26

GoogleCodeExporter commented 9 years ago
Check out the change between
https://code.google.com/p/epubcheck/source/browse/tags/3.0/src/main/java/com/ado
be/epubcheck/opf/XRefChecker.java
https://code.google.com/p/epubcheck/source/browse/tags/3.0.1/src/main/java/com/a
dobe/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)

Original comment by alan.tre...@gmail.com on 6 Jun 2013 at 11:56

GoogleCodeExporter commented 9 years ago
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.

Original comment by richa...@gmail.com on 7 Jun 2013 at 10:30

GoogleCodeExporter commented 9 years ago
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...

Original comment by tobias.c...@gmail.com on 7 Jun 2013 at 9:02

GoogleCodeExporter commented 9 years ago
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.

Original comment by tobias.c...@gmail.com on 7 Jun 2013 at 10:02

GoogleCodeExporter commented 9 years ago
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.

Original comment by richa...@gmail.com on 8 Jun 2013 at 10:52

GoogleCodeExporter commented 9 years ago
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...

Original comment by tobias.c...@gmail.com on 8 Jun 2013 at 10:57

GoogleCodeExporter commented 9 years ago
Issue 281 has been merged into this issue.

Original comment by tobias.c...@gmail.com on 8 Jun 2013 at 10:59

GoogleCodeExporter commented 9 years ago
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. 

Original comment by settus...@gmail.com on 8 Jun 2013 at 11:05

GoogleCodeExporter commented 9 years ago
Thanks Tobias - that is exactly what I was looking for.

Original comment by alan.tre...@gmail.com on 10 Jun 2013 at 10:21

GoogleCodeExporter commented 9 years ago
Issue 283 has been merged into this issue.

Original comment by tobias.c...@gmail.com on 12 Jun 2013 at 9:43

GoogleCodeExporter commented 9 years ago
Issue 285 has been merged into this issue.

Original comment by tobias.c...@gmail.com on 23 Jun 2013 at 12:23

GoogleCodeExporter commented 9 years ago
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

Original comment by kurinji...@gmail.com on 3 Aug 2013 at 2:02

GoogleCodeExporter commented 9 years ago
When is version 3.0.2 due to be released with this bug fixed?

Original comment by jackscot...@gmail.com on 28 Aug 2013 at 10:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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.

Original comment by ramara...@gmail.com on 9 Oct 2013 at 6:44

GoogleCodeExporter commented 9 years ago
Hi ramarajds,

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

Original comment by tobias.c...@gmail.com on 9 Oct 2013 at 7:24

GoogleCodeExporter commented 9 years ago
THIS ISSUE MOVED TO GITHUB:
https://github.com/IDPF/epubcheck/issues/

Original comment by rdeltour@gmail.com on 7 Nov 2013 at 10:49