Jump to content


Photo

Hierarchy problems in User Tools


  • Please log in to reply
3 replies to this topic

#1 Simon Cozens

Simon Cozens

    Member

  • Active Members
  • Pip
  • 19 posts

Posted 22 August 2007 - 12:27 PM

I've been preparing my own user tools from the CCEL (http://www.ccel.org/) ThML sources - which I've converted to Accordance-friendly HTML with a custom XSL stylesheet - but have run across some problems with how Accordance handles importing of HTML pages.

David's blog post says that:

Thus, any text tagged with <H1> is assigned to the Titles field and placed at the top level of the browser hierarchy, just as if you had placed the red T in the margin of the tool's Edit window. Accordingly, <H2> is placed at the second level of the browser hierarchy (as if you had placed a red "1" in the margin of the Edit window); <H2> is placed at the third level of the browser hierarchy (as if you had placed a red "2" in the margin); etc.


This hasn't been my experience. I have a dummy document has a five separate <H1> tags; only one heading appears in the browser at top level. Instead, everything is buried further and further down the hierarchy, to the point where a <h3> tag (say, around "Book Third") is buried seven levels down.

It seems like something isn't resetting a counter properly, as all new higher-level sections are being interpreted as subsections of previous ones.

(Since I can't upload a HTML file via the forums, if you want to try and replicate this, you can get the sample document here.)

#2 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 993 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 22 August 2007 - 01:23 PM

Simon,
This sounds like a bug/feature I pointed out in my HTML User Tool Import test years ago (it's somewhere on these forums).
Try backing out of the nested headers. In other words, something like.
<H1>Main heading</H1>
  <H2>Sub heading</H2>
	<H3>Sub sub heading</H3>
  <H2></H2>
<H1>Another main heading</H1>
  <H2>Sub heading</H2>
	...
You can leave the unneeded ones simply blank. Did that fix it?

Edited by Joe Weaks, 22 August 2007 - 01:25 PM.

Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#3 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 993 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 22 August 2007 - 01:33 PM

Your example file is a mess... the headers need to be an intentional hierarchy if a program is to be expected to put the header sections into nested hierarchical structure.

<h1 style="margin-bottom:48pt" id="ii-p0.1">The Pastor of Hermas</h1>
<h3 id="ii.i-p0.1">Introductory Note</h3>
<h5 id="ii.i-p0.2">to</h5>
<h2 id="ii.i-p0.3">The Pastor of Hermas</h2>

A H1 should be followed by an H2 as section headers. This document is using Headers for formatting, not organizational structure. The snippet I displayed shows how the markup is making the "to" a 5th level header to make it smaller than what's above and below it. This is not how to use HTML. Headers to import into Accordance must be used for structural organization.
Think of a Table of Contents... the occurrence of the headers must make sense as items in a Table of Contents.

Edited by Joe Weaks, 22 August 2007 - 01:35 PM.

Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#4 Chris Echols

Chris Echols

    Member

  • Active Members
  • Pip
  • 45 posts
  • Gender:Male
  • Location:Southeast, GA
  • Interests:God stuff and Audio/Visual Stuff
  • Accordance Version:8.x

Posted 08 February 2012 - 06:05 PM

Simon,
This sounds like a bug/feature I pointed out in my HTML User Tool Import test years ago (it's somewhere on these forums).
Try backing out of the nested headers. In other words, something like.

<H1>Main heading</H1>
  <H2>Sub heading</H2>
	<H3>Sub sub heading</H3>
  <H2></H2>
<H1>Another main heading</H1>
  <H2>Sub heading</H2>
	...
You can leave the unneeded ones simply blank. Did that fix it?


Hey, I'm using 9.5.3 and my hierarchy is not working out either like I want it to. I'm finding when I use blank headings like you describe, it doesn't work, but if I put a "." in between the header tags, i get the expected result, but it doesn't look pretty like I like it.

Is this still a bug?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users