Home
Description
Publications

Available Resources
Text Acknowledgements
Related links


Events


CLaRK System

CLaRK System Online Manual


Bulgarian dialects'
electronic archive




eXTReMe Tracker

 

 

 

 

 

 

 


Menu View

This menu is used to visualize/hide Main Editor components. Whenever an item from the menu is checked, the component it refers to is visualized, otherwise it is not. The menu components are the following:

Toolbar

Visualizes and hides the toolbar from the main system window.

Navi Toolbar

Visualizes and hides the document navigation toolbar from the main system window.

It appears under the main toolbar, on the top of the tree area:

It functions similarly to an Internet browser-like history module (Back/Forward). Each document activation is recorded in the history and if the Back button is used, the system activates the document which was previously active. Similar behaviour can be expected from the Forward button. This functionality can be applied when the work requires the use of more than one document loaded in the editor.

Scrollbar

Visualizes and hides the vertical text scroll bar from the main system window.

Show Current Node Path

Enables or disables the current node path visualization in the status bar of the main system window.

Show Memory Monitor

Visualizes and hides the Memory Monitor from the main system window. When this option is checked, the monitor window appears on the main menu bar indicating the amount of memory, currently used by the system. By pressing the monitor, a Garbage Collection is run. It reduces the amount of used memory and increases the efficiency of next operations.


Text Area

Shows and hides the Text Area of the main system editor. Hiding the area improves the performance of the system when huge amount of data is loaded in the editor.


XPath Debugger

The XPath Debugger is a means which supports the user to follow the process of evaluation of an XPath expression written in the Search field of the editor. In order the XPath debugger to start functioning the user is expected to supply a VALID XPath expression. Otherwise, the system produces an error message and points to the incorrect atom or sub-expression. The task of the debugger is not to validate expressions, but to trace step-by-step the process of evaluation of expressions on certain XML structures. On each step, the debugger shows

  • the sub-expression or atom which is currently on focus,
  • the current context node for which the evaluation step is performed and also
  • the partial result from the evaluation step.

The XPath Debugger can be enabled by selecting a menu item View/XPath Debugger. The debugger panel appears on the place of the Error Message Panel in the bottom of the Main Editor window.

The appearance of the debugger panel is the following:

The panel consists of two parts: monitoring section and navigation section.

The monitoring section shows the query XPath expression and emphasizes (in red) which sub-expression is currently evaluated. The red marker is moving along the expression as the evaluation process goes forward or backwards. Some parts of the expression might be highlighted more than once if they are evaluated on different contexts.

The expressions which appear in the monitoring section might look slightly different from the initial expressions which are written in the search query field of CLaRK, but they are equivalent. Differences may come from the fact that the expressions in the debugger are in a Normal Form. I.e. all elements which come from the abbreviated syntax of XPath are expanded to their full forms ('/A/B/C' goes in '/child::A/child::B/child::C'); complex expressions are decomposed into smaller ones by using brace (usually in binary operations), variable definitions scopes are also marked by brace ('{a := expr1}{b := expr2}($a + $b)'); there are some axis composition optimizations ('//para' goes in '/descendant::para' instead of '/descendant-or-self::*/child::para') and others.

The second part of the debugger panel is the navigation section. It allows the user to go through all the steps of the evaluation, to jump over some of them or to go one or more steps back. To navigate in each direction the user has three buttons (three for forward and three for backwards). Each of the three buttons jumps over different portions of processing steps. The smallest steps (the most detailed navigation) can be done by using and , bigger steps - by and , and biggest (iterating on all contexts for a current expression) - and . On each step of the navigation, in the tree area the context node is marked in green and the resulting nodes (if there are such) are marked in red. Thus the user can follow the partial results generation. Additionally, on each step, an information message is shown on the status bar which describes the current results, which is useful when the result is not of type node-set, but string, number or boolean.

The Reset button is used to stop the process of tracing the evaluation, clearing the monitoring section and restoring the normal system behaviour.

To disable the XPath debugger and restore the Error Message Panel the menu item View/XPath Debugger must be unselected.

Here follows an example how the debugger can be used:

Lets have the following XPath expression: /book[3]/authors/*[2]/text() which is expected to select the second author of a third book. We open a relevant document in the system editor and enable the XPath debugger from the menu.

Having performed an XPath search on the document with the example expression, the status bar shows the following message:

and the monitoring section of the debugger is initialized with the normal form of the expression. At this point the 'debugging' process is still started. To do this, we use any of the Next buttons, lets say button .

Now the debugger is working. We can use the Next and Back buttons to see in details the evaluation step-by-step. Here follows an illustration of three different processing steps:

Step A:

  XPath monitor:
  
  Status bar:
  


Step B:

  XPath monitor:
  
  Status bar:
  


Step C:

  XPath monitor:
  
  Status bar:
  

Note: Step A precedes (not immediately) Step B which precedes Step C.

Graphical Tree View

The Graphical Tree View is a means for drawing of tree structures encoded in XML. The result structure is not necessary to follow the XML logical structure and it is user defined. The structure definition is based on XPath expressions. The view of the result drawing follows a defined in advance layout. The layout definition is described in section Definitions / Graphical Tree Layout. Here we will proceed the description with an example.

Let the source document be a simple RDF encoded ontology. Here is a short fragment of it:

Having selected a node in the document and menu item Graphical Tree View is selected, if the system uses the default layout, the following view appears:

Here each element node is represented by its name (the red ovals) and each text node - by its text content (the yellow rounded rectangle). An useful modification of the layout will be, instead of showing the tag names for the elements, to show the values of attributes rdf:ID and rdf:resource (where appropriate).

Adding two new rules to the layout (one to show the rdf:ID attribute value for element rdfs:Class and one to show the rdf:resource attribute value for element rdfs:subClassOf) will produce the following result:

In the current example (as a typical RDF document), the definition structure is 'flat', i.e. each concept is defined independently with the help of relation references to other definitions. In case we need to observe the hierarchy as a tree on the base of sub-class-of relations it is possible to do that by changing the structure i n the layout. The change will be that the child nodes of a rdfs:Class element will be all rdfs:Class elements which have a rdfs:subClassOf element referring to this element. The elements will be presented by their rdf:ID attribute values. The result is the following:

Tree View Window

The task of the window is to show the result tree image. The drawing canvas is in a way 'active', i.e. it is aware of mouse clicks on it and if such an event is performed on a certain shape, the corresponding source node is selected in the system editor. The synchronization with the editor is two directional, i.e. if the selection in the editor changes the system finds the closest node which can serve as a root according the current layout and reconstructs the image.

Tree view options:

  • Zoom In / Zoom Out - changes the image dimensions in percentage range [25% - 300%]. The upper limit can be lowered if the original image size is tool big. The biggest image which can be visualized without reducing its size can have dimensions: 5000 points width x 3000 points height.
  • Layout - allows changing the layout for the current view. It shows a choice list of all available layouts in the system.
  • Refresh - reconstructs the preview image, which is needed if the source document has been changed.
  • Keep on top - this option enables keeping the view window on focus when the selection in the editor changes in consequence of selection in the drawing canvas. The default behaviour is bringing the system editor window to front in order the show the new selection location.
  • Save as ... - this option allows saving the current view image as an external image file. The supported file formats are: JPEG, PNG and SVG.