Badly formed elements in HTML bibliography -- fix or suppress them?

When I create an HTML bibliography, I find that Firefox merges all the entries after the first 200 into a single very long line of text. I was mostly using the Nature style, but other styles give me the same behavior.

I believe this is related to empty <span class="Z3988 .../> elements in the HTML. I believe these are used to store metadata (COinS?). When I run the troublesome HTML files through the "tidy" program, it strips out all those <span> elements with warnings like:

line 12 column 3 - Warning: trimming empty <span>

I can view the resulting HTML file in Firefox with no problems.

The troublesome <span> elements look like this:

<span class="Z3988" title="url_ver=Z39.88-2004&... .../>

Maybe they should look like <span ...> </span> instead.

Is there any way to avoid this problem -- maybe a configuration option to suppress the <span> elements -- or something else I can do?
  • Zotero is producing XML, but, as you have surmised, the <span/> tag is interpreted differently when parsed as HTML. This will be fixed in the next Zotero release. For now, you can rename the file to have the extension .xhtml, which will make Firefox use the appropriate parser. (Firefox will even fix the spans for you if you go to File->Save Page As and select "Web Page (Complete)" from the dropdown.)
  • Thanks! Renaming the file with a .xhtml suffix fixed the problem.

    Until now I have not had to know about the differences between HTML and XHTML. I guess now is the time.
Sign In or Register to comment.