Hi everyone,
I'm having a lot of trouble with xnotes -- I feel the DTD is
inadequate and/or xnote doesn't treat its input like it should.
Suppose I have an xnote entry like:
<?xml version="1.0" encoding="UTF-8"?>
<doctype etc snip>
<xnoteset>
<xnote id="1" key="dijkstra-the" user="diwaker" date="2004-10-23">
<title>The structure of the THE multiprogramming system</title>
<content type="application/xhtml+xml">
<p>Q. What problem does the paper
address?</p>
<p>A. The design and implementation of a
multiprogramming system with an emphasis on provable
correctness, and a hierarchical architecture which allows for
systematic testing.</p>
[snip] more content here [/snip]
</content>
<link type="reference" target="dijkstra-the"/>
</xnote>
</xnoteset>
Problems:
o my editor wraps XML contents. xnote however, likes to treat newlines
inside <content> literally (that is, they show up in the output --
even in XHTML and HTML) as "\n" which really breaks all formatting.
semantically, the behavior of the content attribute might be correct.
But my understanding was that if after doing an "addnote", you do a
"getnote" to fetch it -- you should get the *exact* same stuff inside
the content tag as before -- that is was "as is" should behave like.
Another issue with the line breaks is that <content> is not able to
treat markup properly if they come after a new line. For instance, the
above is displayed on getnote as:
Note ID:1 (Sat Oct 23 2004)
Key: dijkstra-the
The structure of the THE multiprogramming system
\n [followed by the rest of the content if any]
It just eats the markup and shows spaces instead.
I hope I'm making sense. If not, just do an addnote of above, then do
a getnote -- try all output formats -- scrn, html and xnote to see
what I mean.
Suggestions:
o modifications to the xnote dtb?
o modifications to the output code so that it handles \n in content
appropriately?
TIA
--
Diwaker Gupta
http://resolute.ucsd.edu/diwaker
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
|