This page is no longer maintained — Please continue to the home page at

XML design, part 3: XPath, XSLT

No replies
Jürgen Purtz
Joined: 2009-12-03,
User offline. Last seen 1 year 44 weeks ago.

The "\" and "\\" operators are methodes of scala.xml.NodeSeq. They do a good job
for simple tasks. But they have significant limitations: find the n.-th
subelement, find subelement by name, find parent or sibling element, functions
like 'number of subelements', ... . So there is the question, how to support the
wide range of XPath?

The same problem arise with XSLT. Scala's pattern matching mechnismem is great
for simple things. But when you want to express all the XSLT possiblities by
equivalent pattern matching constructs you have to do a hard job. And some
things would not work at all: As XSLT is build on XPath, one can address parent

Again, my recomondation is using Xerces and Xalan which are part of JRE. Again,
we may need a wrapper layer (which will also help for .NET integration).

Cheers, Jürgen

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland