Monday, November 28, 2005

XSLT read on demand

With the prototype org.livcos.prototype.xslt.read_on_demand we test different XSLT processors about which elements are read from the source for a transformation. We transform a subnode with a stylesheet only matching certain elements.

Report:
  • Xalan reads the complete tree rooting at the source node.
  • Saxon reads the owner document of the source node.
  • Saxon ignores unneeded parts of the tree.
  • XT handles only Stream- and SAXSources. The later are streamed into the internal object model completely.
  • Oracle XDK handles Stream- and SAXSources.
  • Oracle XDK handles DOMSources only with their properitary object model.
  • The Oracle XDK object model is based on abstract classes, therefore a customized implementation needs to be build on top of it.
With all the processors reading only the tree below the source node, only the Saxon Processor would reduce the amount of data being read, by ignoring the parts not matched in the stylesheet.
A DOM-to-SAX event producer allows to feed a copy in the internal format of the individual processors object model.

No comments:

Post a Comment