RE: Help Understanding DTD (Document Type Definition)

  • From: "Rasmussen, Lloyd" <lras@xxxxxxx>
  • To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 16 Jun 2011 11:22:55 -0400

This is the perennial problem with trying to read code examples in HTML or PDF 
with a screen reader.

I looked at the first page of Chapter 2 by several means, using Window-Eyes 
7.2and IE 8.

In the browse buffer, anything that is styled ends up on its own line, and line 
indentation isn't preserved.  This is what I expected.

With browse mode off (which is Forms Mode for JAWS), with caret browsing on (F7 
key in IE 8), you can actually find out how much indention was used, and the 
W-E Format Alert mode can tell you the number of spaces automatically.  You may 
have to route the mouse pointer to the correct part of the page before the 
cursor will track the correct area.

Saving the page as text and loading it into UltraEdit or another text editor:  
indention is preserved.  However, at the end of the <pre> section, the next 
block of text was abutted to the last line of the code.

Examining the HTML source of the page, either with IE's F12 "developer" 
function, or as a saved file,  the code is automatically generated, but at 
least the class names and other attributes give you a clear idea of the intent, 
if you care to look.  But nesting <div>s 4 or 5 levels deep in some places (!) ?

It's a good thing they make the source code of the examples available in a ZIP 
file.

Lloyd Rasmussen, Senior Project Engineer
National Library Service for the Blind and Physically Handicapped
Library of Congress   202-707-0535
http://www.loc.gov/nls
The preceding opinions are my own and do not necessarily reflect those of the 
Library of Congress, NLS.


From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Homme, James
Sent: Thursday, June 16, 2011 7:34 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: Help Understanding DTD (Document Type Definition)

Hi Lloyd,
A style sheet is associated with that page. It looks like the classes 
associated with the span elements have nothing to do with positioning. They 
change the visual look of keywords and such.

Jim

From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Rasmussen, Lloyd
Sent: Wednesday, June 15, 2011 4:44 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: Help Understanding DTD (Document Type Definition)

I'm not sure that <span> is allowed within <pre> elements.  So the behavior 
when this occurs may not be well defined.  I don't know whether a stylesheet is 
associated with this page (I didn't go and examine it), nor the effect of your 
browser's default stylesheet when one is notloaded by the HTML.

Lloyd Rasmussen, Senior Project Engineer
National Library Service for the Blind and Physically Handicapped
Library of Congress   202-707-0535
http://www.loc.gov/nls
The preceding opinions are my own and do not necessarily reflect those of the 
Library of Congress, NLS.


From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Homme, James
Sent: Wednesday, June 15, 2011 1:05 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: Help Understanding DTD (Document Type Definition)

Hi,
This is HTML 4.01 transitional. What I think should happen is not. I think that 
JAWS is not allowing line breaks when it sees span within pre elements. In 
order to attempt to verify that the problem is with JAWS, I want to make sure 
that span is allowed within the pre element. The page in question is at 
http://diveintopython.org/getting_to_know_python/index.html

From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Rasmussen, Lloyd
Sent: Wednesday, June 15, 2011 12:51 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: Help Understanding DTD (Document Type Definition)

It might not make a difference in the case of the <pre> element, but is this a 
strict or transitional DTD?


Lloyd Rasmussen, Senior Project Engineer
National Library Service for the Blind and Physically Handicapped
Library of Congress   202-707-0535
http://www.loc.gov/nls
The preceding opinions are my own and do not necessarily reflect those of the 
Library of Congress, NLS.


From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Homme, James
Sent: Wednesday, June 15, 2011 12:41 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Help Understanding DTD (Document Type Definition)

Hi,
I want to check the DTD for HTML 4.01 to see which elements are legal inside 
the pre element. Does anyone know of a short explanation of the syntax for 
Document Type Definition files?

Jim Homme,
Usability Services,
Phone: 412-544-1810.

Other related posts: