View Single Post
Old 12-17-2016, 08:08 PM   #1
pluma
Enthusiast
pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.pluma ought to be getting tired of karma fortunes by now.
 
Posts: 48
Karma: 854254
Join Date: Nov 2016
Device: none
Content on separate files??!!

hallo,

For testing purposes and learning I've grabbed two epubs that were reccomended here, "Alice in the Geilstadt" from a user here and "Huckleberry Fin" from guntenberg project.

They both got splitted content, "Alice" is rather confusing because sometimes splits a novel's chapters into two files and "Huckleberry Fins" is splitted by chapters.

What I'd like to do is to separate non-text content separately becouse the HTML code becomes quite long.

And example would be the "Alice" epub having separated the charactres dialogs. For instance like the following structure:

Chapter --> /root/Chatpers/{1,2,3,...}
Character A --> /root/Dialogs/Person_A/foo.html
Character B --> /root/Dialogs/Person_B/bar.html
Character C --> /root/Dialogs/Person_C/baz.html

Ok, that's just for the sake of example, perhaps it wont be the ideal organization for a play but what I am trying to illustrate is content splitting.

So for this I read a link but it's not entirely clear what to do as doesn't give a full example:

link: https://idpf.github.io/a11y-guidelin.../sections.html

Code:
    <section epub:type="chapter" id="c01">
    <h1 id="c01h01">Chapter 1. Loomings.</h1>
    <p>Call me Ishmael. … </p>
    …
    </section>

    <section epub:type="chapter" title="chapter" id="c01">
    <p>It was a dark and stormy night … </p>
    …
    </section>

    <section epub:type="chapter" aria-label="chapter" id="c01">
    <p>It was a dark and stormy night … </p>
    …
    </section>
Then there's a brief explanation about different approaches by using either:

Quote:
There are two approaches you can take to flattening out your content, and neither is optimal — at least in terms of retaining the original structural hierarchy in the markup. The first is to include the part heading with the first chapter:

<body>
<section epub:type="part">
<h1>Part I</h1>
<section epub:type="chapter">
<h2>Chapter I</h2>
</section
</section>
</body>

Each subsequent chapter file would contain a single section with an h2 heading. Although this markup approach appears to suggest that the part only contains a single chapter, consistent heading numbering will allow an assistive technology to correctly orient the reader.

The other approach is to separate the part heading into its own file:

<body>
<section epub:type="part">
<h1>Part I</h1>
</section>
</body>
In my case I am not trying to separate chapters but random HTML sections which I think is got to do with a comment on that link:

Quote:
Self-contained secondary content embedded within a section — such as sidebars, mini-articles, etc. — should be identified using the aside and article elements, as appropriate.
However it doesn't follow with a practical example.

Furthermore I am confused by the linking syntax wich is a bit counter intuitive:

Code:
<section epub:type="chapter" aria-label="chapter" id="c01">
^^^ w00t


Lastly the link only shows the code of the linker but what about the linked content? How does the html on the target file look like there?

I'd appreciate if somebody could provide a working example.

lots of dankes!
pluma is offline   Reply With Quote