XSL Extensions

I am currently working on a project using XML/XSL (as, it would seem, is the
rest
of humanity).

As part of this project we have introduced a few relatively minor extensions
that I
thought might be of interest...

1) We have extended the syntax "EqualityExpr ::= SelectExpr '=' Literal" to
allow a new
function 'any-of()' on the rhs. This takes as its argument a select
expression. The
equality expression returns true if any of the results of the lhs match any
of the
results of he select expression - hence the name! This is extremely useful
when we
wish to select details from one part of a document, based upon the contents
of
another part of the same document.

2) Added a != operator (removes the need for a lot of opaque not()'s - with
very
little effort).

3) Added 'else' and 'elsif' - to be used in conjunction with the existing
'if' element.

4) Added an 'href' attribute to almost all of the existing xsl elements
(e.g. 'if') which
refers to an external xsl file. This file is (logically) inserted as the
content of the
element - preceding any actual content (although the use of both facilities
is discouraged.
This allows us to both structure our templates in a reasonable way and to
re-use common
stylesheet contents.

Please excuse me if this is too trivial for your consideration, but I
thought it
should do no harm and might conceivably be of some use!

Regards

	Andy Doddington

Received on Tuesday, 6 April 1999 15:21:24 UTC