XML Processing with Scala and yaidom
Chris de Vreeze · 2015
This paper discusses improving the performance of XSLT programs that use very large numbers of similar patterns in their push-mode templates.The experimentation focusses around stylesheets used for processing DITA document frameworks, where much of the document logical structure is encoded in @class attributes.The processing stylesheets, often defined in XSLT1.0,use string-containment tests on these attributes to describe push-template applicability.For some cases this can mean a few hundred string tests have to be performed for every element node in the input document to determine which template to evaluate, which in sometimes means up to 30% of the entire processing time is taken up with such pattern matching.This paper examines methods, within XSLT implementations, to ameliorate this situation, including using sets of pattern preconditions and pretokenization of the class-describing attributes.How such optimisation may be configured for an XSLT implementation is discussed.