[Refdb-users] getref -t xhtml produces invalid xhtml (and no css effects)
Status: Beta
                
                Brought to you by:
                
                    mhoenicka
                    
                
            | 
      
      
      From: David N. <dav...@bi...> - 2004-03-16 12:44:43
      
     | 
| The following command:
    refdbc -C getref -o refs.xhtml -t xhtml ":ID:>0"
produced an invalid xhtml file.  (I'm using a recent CVS snapshot - how 
can you tell the refdb version in use, anyway?.)
The problem is simple: the trailing slash is missing in the first 'meta' 
tag (meta http-equiv ...).
Here is the start of the xhtml file:
.................................................................
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta 
http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>refdb reference list</title><meta name="generator" content="refdb 
0.9.4" id="generator" /><link rel="stylesheet" type="text/css" 
href="/usr/local/share/refdb/css/refdb.css" />
</head>
<body>
<h1 class='h1'>refdb reference list</h1>
.................................................................
Here is the w3 validator's feedback:
.................................................................
This page is not Valid XHTML 1.0 Transitional!
Below are the results of attempting to parse this document with an SGML 
parser.
   1. Line 3, column 121: end tag for "meta" omitted, but OMITTAG NO was 
specified
  ...tent="text/html; charset=ISO-8859-1">
                                          ^
   2. Line 3, column 49: start tag was here (explain...).
  ..."http://www.w3.org/1999/xhtml"><head><meta 
http-equiv="Content-Type" content=
                                          ^
.................................................................
Slightly more difficult for me to explain is the appearance of the xhtml 
file in mozilla-firebird on my machine (Firebird 0.7-7; Mozilla 1.6, 
Copyright (c) 2003 mozilla.org, build 2004022702; Debian 
Sarge/Testing).  Although the stylesheet is specified with a <link> tag, 
the file does not display in the browser with any of the author and 
citekey formatting changes specified in the css file -- citekey in bold, 
author in blue.  If I use a similar getref command to produce html, the 
html file _does_ display with the formatting changes.
A diff command shows that the html and xhtml files differ only in their 
initial declarations, with the citations themselves being identical:
.................................................................
$ diff refs.639.html refs.639.xhtml
1,7c1,4
< <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
< <html>
< <head>
< <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
< <title>refdb reference list</title>
< <meta name="generator" content="refdb 0.9.4">
< <link rel="stylesheet" type="text/css" 
href="/usr/local/share/refdb/css/refdb.css">
---
 > <?xml version="1.0" encoding="ISO-8859-1"?>
 > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 > <html xmlns="http://www.w3.org/1999/xhtml"><head><meta 
http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
 > <title>refdb reference list</title><meta name="generator" 
content="refdb 0.9.4" id="generator" /><link rel="stylesheet" 
type="text/css" href="/usr/local/share/refdb/css/refdb.css" />
$
.................................................................
Here is an example citation from the xhtml file:
.................................................................
<div class="record">
<h2 class='ID'>ID*:1 (1994)</h2>
<p class='authors'>Lamport,Leslie</p>
<p class='book'>LaTeX: A Document Preparation System</p>
<p class='citekey'>CITEKEY:Lamport1994</p>
</div>
.................................................................
As far as I'm aware, xhtml _can_ use css.  I can think of two possible 
causes for the behaviour I observed:
 - a specific problem with the firefox browser on my machine that 
prevents it honoring the css formatting rules, or
 - a problem with the cascading stylesheet itself which results in it 
not being applied to xhtml in any browser.
To decide which, it would be useful to know if anyone has been able to 
display getref-produced xhtml with intact css formatting on their machine.
Of course, there may be another explanation.
Regards,
David.
 |