Archive for the ‘xsl’ Category

XSL Customizations Easy at Last?

février 3, 2007

From Word Processing to XML Writing

Editing XML for writing technical documentation has become easier recently thanks to efficient WYSIWYM (What You See is What You Mean) editors like XXE, XMLSpy, Serna, etc.

This has allowed the diffusion of XML writing to non XML savvy populations, that were glad to get away from word processor limitations and headaches. The problem came at publication time.

It is sometimes difficult to introduce the notion of « styles » in a word processor, so explaining people they have to learn XSLT and XSL-FO, plus manually edit the XSL by hand… go figure.

How to Control Presentation

Some (proprietary) tools provide helpers:

  • Oxygen for example presents the list of parameters so that modifying a customization layer (DocBook for example) is easier. However all parameters are listed in no order and no check is made on parameter value.
  • Arbortext provides a word processor like interface allowing to precisely control of the rendering of each XML element.

Otherwise you are doomed to learn XSL, XSL-FO, plus the documentation for each of the XML languages customizations layer you indent to use.

Towards a Standard Way of Writing Customizations Layers

I believe that, if we have a standard and structured way of writing a customization layer and its documentation, it would be easy to have tools able to:

  1. parse the customization layer structure and elements
  2. build a graphical interface based on this information
  3. guide the user in defining the parameters
  4. generate a customization layer containing the user defined data

Customization Element Types

There are probably not much element types:

  1. Specific parameters, whose value is constrained by a specific type (Boolean, numeric, choice list, etc.)
  2. Specific XSL-FO attributes for:
  • page sequence masters
  • blocks (attribute-set)
  • inline

The idea is not to allow the user to define all possible rendering variable, but provide him with a structured, documented, set of parameters so he can easily make changes on the parameters defined in the « meta »-customization layer.

In Practice

2 possible implementations occur to me:

  1. Meta Customization: use a meta-customization XML vocabulary for defining parameters, organizing them in sections, setting the type, the possible values, etc. So that an application can parse it, build a graphical interface, generate XSL code.
  2. Add the required information for each parameter in a different namespace so the stylesheet itself can be used by the XSLT processor, and at the same time be parsed and modified by the graphical interface.

Conclusion

With such a standard, every tool that supports it would be able to show its users a nice way of customizing the transformation of all the vocabularies that would provide compatible customization layers (DocBook, DITA, TEI, …).

I am convinced it would make the life of many users easier, and many experts too 🙂

Publicités