Saxon-CE users have built proof of concept demonstrations to show the use of the Saxon-CE software.
The TEI (Text Encoding initiative) is widely used by scholars for building literary corpora (databases of digitized text). As an XML vocabulary, TEI is complex because it has to tackle problems like associating annotations with different parts of the text, and representing overlapping fragments (for example, quotations that cross paragraph boundaries).
Because of this complexity, XSLT 2.0 brings considerable benefits, with features such as grouping and regular expression support. Wendell Piez of Mulberry Technologies, Inc. demonstrates how Saxon-CE can be used to process TEI markup in two areas:
- the ability to display textual annotations
- the ability to show boundaries of overlapping fragments
Saxon-CE helps here in two ways:
- it brings the power of XSLT 2.0 to the browser, to tackle the complex processing needed
- it enables an interactive rendition of the document, without dropping into low-level Javascript code
The application, developed by Gerrit Imsieke of le-tex publishing services GmbH, demonstrates a WYSYWIG style XML editor with TEI as the sample vocabulary.
Use XSLT 2.0 in the browser to enhance views of clinical documents
Piers Hollott, of Sierra Systems, has published a paper describing how to implement a client-side healthcare application using Saxon-CE and the Health Level 7 (HL7) Clinical Document Architecture (CDA).
Phil Fearon, currently on the Saxonica team, developed this tool to demonstrate Saxon-CE. It shows the benefits of using the plain-text parsing capabilities of XSLT 2.0. Note how responsive this app is during 'press-and-hold' keydown operations for highlighting XPath steps.
The XSLT here is doing a fair amount because each step is a span
element and 2 sets of elements are first created, those to be highlighted and
those to be unhighlighted. Any overlap between these sets is then removed before
initiatingixsl:set-attribute
on each element set to change the
background colour.
Manfred Staudinger has used Saxon-CE to develop an interactive tool for drawing diagrams of floor plans.
The floor plan shown with XHTML is one of the results of XProc processing a DWFx file which contains many AutoCAD drawings, where the path information is transformed from XPS into SVG. This XHTML file is 1.8 MB and contains about 2000 path elements. Each path typically has 30 to 40 instructions for an imaginary pen (like moveto, lineto or closepath) and defines a shape which can be filled; some, however, contain nearly 100,000 instructions.
Developed and tested with Opera 11 and Firefox 12 (works fine with Chrome 20 too, not tested with Safari or IE 9).
Notice the black and white drawing visible only during the initial load, which shows all the path elements as they are loaded. Any SVG attributes are applied at runtime with Saxon-CE, from a small attribute file with different sections for initialisation and for click events.
The Scale option ("Vergrößerung") enables you to change the size of the SVG drawing which starts at the maximum screen size, currently defined with integers. The drawing will scroll automatically from the position from the last click, towards the middle of the screen, as far as possible. Last click is defined as the last click showing a message or, without such a click, the middle of the drawing. The HTML part is positioned absolutely, is not effected by scaling and can be hidden or shown with a click on the arrow in the upper left corner.
The categories have up to 5 columns of check boxes from which the first or leftmost is the main one: if unchecked, no path element belonging to this category will be drawn. The rightmost column stems from the XProc processing. The middle 3 columns represent sub-categories differentiated by an heuristic method to better understand the drawings. Compare for example the 2 shapes for rooms ("Räume") both created by using Revit (an Autodesk add on for DWFx).
If an area is clicked, it is highlighted (as defined in the above mentioned attribute file) and a short text message is displayed at the clicking point. The text size is 12px and does not change with the scale of the plan. The 600 text messages are only a small fraction of what could be retrieved from the DWFx file, to show what is possible. They are held in a separate file and fetched only when requested. If the same area is clicked for a second time, the highlight stays on but instead of the message, various additional information appears, most visible for rooms. On a third click the area reverts to its initial state.