Activity Log
This is Ion's activity log for the SoC work on ArgoPrint.
TODO List
Unordered list with things that must be done:
Dialog
- (done) ArgoPrintDialog should have as parent the ArgoUML window
Manager
- internationalization
- fix code-style warnings
- alternate datasources using a pluging/interface in addition
to XML imput
- the "Edit" item in the context menu should open the template
specified in the selected row in the editor
- command line utility for the manager (basically the same functionality
with the xslproc or xalan tool - input, output, template, params)
Editor
- keybindings
- internationalization
- fix code-style warnings
- "wrap" long lines - comments/text is a single node an whitespace
in the sorce-file is no longer available for use after parsing
- complete implementation of DOM-3-Val specification
- fit remaining editing functions into GUI
- guided editing for XPath (selecting data from the input sources)
- (done) speed-ul XPath evaluations using compiled expressions
and variable handlers.
- multiple schemas used simulatanously with guided editing
- preview of result (as XML as it would take additional plugins
to handle the multitude of possible outputs)
- raw text editing (I no longer think that raw editing is
a good idea - Ion Savin).
- handle xml that does not have a namespaceURI specified or
has walidation specified as DOCTYPEs
- WYSYWYG on top of basic guided editing
- (partial) XPath highlighting should work with namespaces (did'n figure out
why it doesn't work) - currently instead of "/grammar" you have to use
"/*[local-name()='grammar']" - update:
- using XPath to select nodes in the document and access to the functions
in the context menu that can be applied to all of these nodes (remove, collapse
and expand)
- copy/paste functionality
- ability to drag a subtree and to move it around the document using the
mouse and the ability to drop the subtree on the places where it would be
valid to drop it (with the highlight of these places)
Guided Editing implementation
Given that the DOM validation
specification is not implemented in any available parser I decided to implement it myself trying to
make the transition to a future standard implementation, once it's available, easy.
Initially I wanted to provide an implementation of the
Java bindings
available in the standard and to make the parser create instances of DOM trees using these type of nodes.
I thought that it was possible to give to the parser a factory instance that would create the initial
Document instance that would then be used to create the rest of the parts of a DOM tree. Unfortunatlly I
could not find a way to achieve this so I decided to bundle all the instance methods that would have been
defined on the DOM "parts" into a single class and make them static and taking as parameter the "part"
instance to which the message would have normally been send in the standard implementation.
Provided that I understood how to implement the API correctly the transition to the standard DOM-3-Val
API should only imply the change from static calls on the GuidedEditing class to instance calls on the
"parts".
For the implementation I considered DTDs, XML Schemas and Relax NG schemas. I've decided to use Relax NG
since it's less complex in comparison to the XML Schemas and since the DTDs can't handle namespaces well and
the use of XSLT implies the use of multiple namespaces in a single document.
The input Relax NG schemas must use the
simple XML syntax. Convertion tools
to Relax NG and
to the simple syntax are available and
schemas for various XML vocabularies including XSLT.
At the moment the validation queryes are answered by evaluating XPath expressions against
the parsed simple-syntax Relax NG schemas which makes them really unefficient but it's only a
temporary solution until I find a way to speed things up.
Activity
-21/08/06 Fixes, todo list items, XPATH guided editing prototype.
15/08/06 Windows env set-up for testing. Prototyped XPath guided editing
functionality. Tried to fix the XPath highlighting issue with respect to default
namespaces - without positive results - NamespaceContext seems not to be used for
the default namespaces. Digged the net for info regarding the issue Linus is having
with the generator but couldn't find anything different from the previous search -
the presence of whitespace before the "xml" processing instruction which turned out
not to be the case. Also the search for solution to the XPath evaluation issue didn't
turn out any useful result. I could not find any documentation besides the API doc
which isn't of any help as it doesn't explain how the evaluation is done and how the
nodes are considered. The W3C specification of XPath was no help either as it leaves
the implementors freedom with respect to this. The ugly part is that I have to work
with interfaces and not with implementations and a stricter specification would have
been helpful in this respect.
-14/08/06 The editor is usable but kind of primitive - it does not allow
the editing of more then one file at the time it does not have undo/redo functionality.
I consider it good for XML browsing but the editing bit needs more work. Most of the
work from the previous post consisted on looking at OSS editors, reading the DOM-3-Val
specification, reading about DTDs, XML Schemas and Relax NG in the context of using
them for guided editing. DTDs turned out to be too restrictive because they are not
aware of namespaces, XML Schema prototypes turned out impossible to write because of
the complexity of the vocabulary. Relax NG schemas are turned out to be easyer to use
for this purpose especialy in simple form. Besides this there were some modifications
to the code that can be traced in the repository.
-29/06/06 Work on the template-management GUI part; it took two
rewrites and lots of tests because of the strange depedencies between components.
Still not complete but it seems to be going in the right direction. I was unable
to figure out why the SplitPane doesn't split the space between the components
according to the specified ratio.
26/06/06 Looked into Schemas, DTDs and Relax NG to be used for
the completion/validation operations for the editor. Discovered the xmloperator
editor which is very similar to what I had in mind for the ArgoPrint editor.
22/06/06 Solved the resources-from-jar issue, edited some icons,
completed basic attribute manipulation functions.
21/06/06 Work on the CellEditor/Renderer. Considered the posibility
of implementing a system similar to ArgoUML critics for the ArgoPrint editor.
Still couldn't solve the issue with the access to the resources.
20/06/06 The editor has now basic functionality: tree representation
of XML content, new/save/load functions implemented, basic tree manipulation
(adding nodes/removing subtrees). I've experimented with various custom CellEditors
and CellRenderers that will be used as interface for altering the content of the
tree. Still haven't figured out how to access resources (icons and resource bundles)
that are located inside the same jar as the module (looked at dev@argouml archives
and the cookbook; will look at the argouml source code in the morning). I will
commit the changes after I obtain a satisfying result with the Renderers/Editors and
after I add the license/copyright headers.
-19/06/06 XMI/XSLT evaluation, looked at other XML/XSLT editors,
coding for the editor - custom widgets, basic GUI framework
11/06/06 Looked at the XMI-related material in the dev archive,
cookbook and the relation between versions of XMI and UML. Looking to see if
making ArgoPrint work with XMI 2.1 (corresponds to UML 2.0) and providing
a transformation from XMI 1.2 to XMI 2.1 would not create problems hence
solving the problem of having to modify ArgoPrint when UML 2.0 will be used.
Tried to figure out a way of using reflection with XSLT but nothing seems
to work in that direction. Considered a candidate standard XML DTD to be used
to specify data-sources and output for ArgoPrint.
10/06/06 Re-done Chapter 3 of XSLT evaluation based on
the remarks made by Linus.
09/06/06 Looked at the GUI implementation of ArgoUML, drafted
some requirements for the ArgoPrint dialog and done an interface prototype.
08/06/06 School stuff. No more school from now on.
07/06/06 School stuff.
06/06/06 School stuff.
05/06/06 JET evaluation. SoC-related papers.
04/06/06 XSLT Evaluation, learning ANT, cookbook+code exploration
03/06/06 Another distraction is over, finished the SCJP training.
02/06/06 Velocity Evaluation
29/05/06 Read JET tutorials. Set up the Eclipse to work with
JET and made some tests. Read parts of the CookBook and had a look
at the project's code.
28/05/06 Read parts from "DocBook: The Definitive Guide",
ArgoUML Cookbook, Velocity Developer's Guide.
27/05/06
Read Velocity User Guide at [1]. The language seems to
have the same problems like StringTemplate. A unified model is
required for multiple data sources and sorting and filtering have to
be backed up with specific code in the model.
26/05/06
Read the StringTemplate 2.2 documentation [1] and Terence Parr's
article on MVC separation [2] and installed the library and made some
simple tests. The implementation is nice (a couple of Smalltalk-like
constructs) but it does not allow fitering, sorting and multiple data
sources from within the template (violation of functional requirements
F-3.2, F-3.3). I could not find an editor to know about StringTemplate
([3] is a relatively recent thread supporting this).