MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   A problem with my link to the style sheet (https://www.mobileread.com/forums/showthread.php?t=237432)

Warbird Books 04-10-2014 09:44 AM

A problem with my link to the style sheet
 
I have built several e-books with Sigil, but now encounter an error that baffles me. When I run Flight Crew, I get this error for every single file:

element 'link' is not allowed for content model '(#PCDATA)'

referring to this line in the <head>:

<link href="../Styles/epub.css" rel="stylesheet" type="text/css" />

which is identical to the style sheet link in my other books.

Where did I go wrong?

Thanks!

Toxaris 04-10-2014 10:16 AM

Is the <link> tag positioned correctly? Did you not accidentally put it between the <body> tags?

Warbird Books 04-10-2014 11:55 AM

Quote:

Originally Posted by Toxaris (Post 2806732)
Is the <link> tag positioned correctly? Did you not accidentally put it between the <body> tags?

No, it's up there in the head. Here is the entire start of each file:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../Styles/hawks.css" rel="stylesheet" type="text/css" />
</head>

<body>
etc.

DiapDealer 04-10-2014 01:03 PM

Quote:

Originally Posted by Warbird Books (Post 2806791)
Here is the entire start of each file:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../Styles/hawks.css" rel="stylesheet" type="text/css" />
</head>

<body>
etc.

You truly have no title element at all in any of your files?

I copy your code exactly (and create a hawks.css file) and paste it into a new Sigil epub and don't get any errors except for the one about "missing elements in content model" (which is because of the missing title element).

Warbird Books 04-10-2014 05:18 PM

I put in a title and got the same set of errors. Then I realized that one file (the first) was actually not on the list, and that was the one I had copied for you. The others had one additional line, preceding the link to the style sheet, viz:

<style type="text/css">

So I see that the "type" was stated twice, once in that line and again in the actual link to the style sheet.

I removed the line in 12 files, ran Flight Crew, and got No problems found!

So thank you! All is now well.

(I never got an error about the missing title, but perhaps I would have done on epubcheck.)


All times are GMT -4. The time now is 10:13 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.