Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2012, 09:41 PM   #1
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
Posts: 322
Karma: 1028382
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
ADE and <switch> tag?

I'm trying to debug or work around a particularly nasty bug in ADE. If I create an SVG blob containing a <switch> element, it renders a blank page. (http://forums.adobe.com/thread/1102962)

Any ideas? The content in question is:

Code:
<?xml version="1.0" encoding="utf-8"?> 
<!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" xmlns:svg="http://www.w3.org/2000/svg">
<head>
<title>Early Colonial Life</title>
<link rel="stylesheet" type="text/css" href="nookstyles.css" />
<link rel="stylesheet" type="text/css" href="nookstyles2.css" />
</head>
<body>
<div class="partpage">
<svg width="6in" height="9in" baseProfile="tiny" viewBox="0 0 4320 6480" preserveAspectRatio="xMidYMid">
  <g transform="scale(10)">
<g fill="none" stroke="green" stroke-width="1"><line x1="0" y1="0" x2="431" y2="0" /><line x1="431" y1="0" x2="431" y2="647" /><line x1="431" y1="647" x2="0" y2="647" /><line x1="0" y1="647" x2="0" y2="0" /></g>
    <switch>
        <foreignObject x="0" y="148" width="432" height="300" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" requiredExtensions="http://www.w3.org/1999/xhtml">
            <div class="pp_partnum" xmlns="http://www.w3.org/1999/xhtml">Part I:</div>
        </foreignObject>
        <text x="216" y="148" text-anchor="middle" >Part I:</text>
    </switch>
    <switch>
        <foreignObject x="0" y="200" width="432" height="300" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" requiredExtensions="http://www.w3.org/1999/xhtml">
            <div class="pp_title" xmlns="http://www.w3.org/1999/xhtml">Early Colonial Life</div>
        </foreignObject>
        <text x="216" y="200" text-anchor="middle" >Early Colonial Life</text>
    </switch>
    <switch>
        <foreignObject x="0" y="538" width="432" height="140" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" requiredExtensions="http://www.w3.org/1999/xhtml">
            <div class="pp_subtitle" xmlns="http://www.w3.org/1999/xhtml">Spring, 2304</div>
        </foreignObject>
        <text x="216" y="538" text-anchor="middle" >Spring, 2304</text>
    </switch>
  </g>
</svg>
</div>
</body>
</html>
dgatwood is offline   Reply With Quote
Old 11-22-2012, 04:04 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,190
Karma: 7422141
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
I wouldn't called it a bug actually. Not the complete SVG standard is supported according to the ePUB specifications. I have no time to look it up, but I would be surprised if switch was supported in the specifications.

I looked it up. The SVG 1.1 specs must be supported, with the exception of animation and scripting. I assume that switch falls under the scripting.

If you want to look it up yourself, check the spec here.

Last edited by Toxaris; 11-22-2012 at 04:11 AM.
Toxaris is offline   Reply With Quote
 
Advertisement
Old 11-22-2012, 03:21 PM   #3
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
Posts: 322
Karma: 1028382
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
The spec says:

Quote:
OPS supports the full SVG 1.1 Recommendation. The only exception is that since OPS is not targeting interactive content. SVG animation and scripting features are not supported and must not be used by publication authors; a Reading System should not render such content. CSS styling of SVG must be fully supported.
The switch tag is part of the extensibility section, not the scripting or animation sections, so I would interpret that to mean that it is required functionality for spec-compliant EPUB readers. That said, I don't absolutely have to have the switch tag because, realistically, SVG content inside HTML content is never going to be rendered by any user agent that doesn't support HTML anyway.

I was able to construct a tree that renders correctly in ADE, correctly in browsers, badly (but tolerably) in iBooks, etc. Unfortunately, epubcheck says it is invalid because it doesn't like the body tag inside the foreignObject tag (which is required if you want ADE to display the HTML content) and because it doesn't like the foreignObject anywhere except inside a switch tag.

Quote:
<?xml version="1.0" encoding="utf-8"?>
<!-- version="-//W3C//DTD XHTML 1.1//EN" -->
<html version="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg">
<head>
<title>Part page</title>
<link rel="stylesheet" type="text/css" href="nookstyles.css" />
<link rel="stylesheet" type="text/css" href="nookstyles2.css" />
</head>
<body>
<div class="partpage">
<svg:svg version="1.1" width="6in" height="9in" baseProfile="tiny" viewBox="0 0 4320 6480" preserveAspectRatio="xMidYMid">
<svg:g transform="scale(10)">
<svg:g fill="none" stroke="green" stroke-width="1"><svg:line x1="0" y1="0" x2="431" y2="0" /><svg:line x1="431" y1="0" x2="431" y2="647" /><svg:line x1="431" y1="647" x2="0" y2="647" /><svg:line x1="0" y1="647" x2="0" y2="0" /></svg:g>
<svg:foreignObject x="0" y="148" width="432" height="300" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<body>
<div class="pp_partnum" xmlns="http://www.w3.org/1999/xhtml">Part I:</div>
</body>
</svg:foreignObject>
</svg:g>
</svg:svg>
</div>
</body>
</html>

Last edited by dgatwood; 11-22-2012 at 03:27 PM.
dgatwood is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Switch - FREE catherinecondie Self-Promotions by Authors and Publishers 4 12-27-2011 02:13 PM
Adding an Owner tag to tag list? Fangles Library Management 1 02-25-2011 03:32 AM
Troubleshooting K3 did not switch off 1Bookworm Amazon Kindle 5 01-24-2011 10:16 PM
Problem with on/off switch pietvo Onyx Boox 0 07-05-2010 11:22 PM
On Switch debbiew Sony Reader 5 11-13-2009 10:52 AM


All times are GMT -4. The time now is 06:21 AM.


MobileRead.com is a privately owned, operated and funded community.