Re: [tasklist] tasklist and netbeans xml file

Tor Norbye <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Organization Sun Microsystems, Inc
Message-ID <1046873955.2393.65.camel@proto>
On Tue, 2003-03-04 at 14:55, vbrabant wrote:
> Why not. I am ready to try to do it. Certainly if you say that the code 
> is fairly isolated.
> I will look at the HTMLSupport and xCalendar.java and try to do a 
> XMLSupport based upon a mix
> of those two files.

I actually think HTMLSupport is the one you should focus on.

I realized that xCalSupport isn't ideal for the export-to-xml-then-
translate-to-xsl job, because the xCalSupport will produce 
xCalendar XML files. This means you will NOT get for example
data about which columns (fields) are visible, how much width
to allocate to each, etc.  And the XSL stylesheet will have to do
a LOT of work. For example, in one part of the XML file it may
give you a timezone identifier, then in other places you'll get
e.g.
  <last-modified>20030302T011308</last-modified>
which you then have to translate to a localized time for the given
timezone. Or it may not have a timezone field and the timezone will
be appended to the end of last-modified above, e.g.
  20030302T011308EST
Then there's <related-to> which is the way you'll find out about
subtasks etc - nope, they won't be included inside a parent element,
you have to reconstitute the tree yourself.

So I think it will be much easier to just modify the HTMLSupport
class (after copying and renaming it XMLSupport obviously) to
do exactly what it does today, except instead of dumping out
<TR></TR> around nodes and <TD></TD> around node properties,
dump out the property name instead!

e.g. you end up with
 <Task>
  <Summary width="180">Hello World</Summary>
  <Priority width="50">Low</Priority>
  <Done>True</Done>
 </Task>
 <task>
   next task here

This corresponds closely to the HTML that would be exported,
and translating this to HTML aia XSL should be straightforward.

In the HTML export code you'll see that it's operating on
node properties, so getting the node name (which is currently
not used) is easy.

-- Tor
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.