Hi,
we have been developing a template system similar to xslt some time ago
and want to port it to xsl to enhance functionality and become standard
compatible. As the language is quite similar to xslt it's should not be
that hard. The only problem I have is the following:
the language we developed has a <region> element where you can specify
an xpath. It simply changes the current node while staying in the same
template. for example (I converted the other elements to xsl already)
<template match="/html">
<xsl:value-of "head/title"/>
<region select="body//div[@class='content']">
<xsl:value-of "h1"/>
</region>
</template>
What is the best way to express a construct like this in xslt? Well I
could use a xsl:for-each which matches just the first result, but that
looks quite ugly... any suggestions?
I also thought about coding an extension element to be able to use our
region element. But I am not sure what drawbacks I have to face
regarding compability to different processors. I can live with the need
of writing more than one extension to support the element, but are there
any processors that don't support extension elements at all? (At least
in java world?)
Any ideas?
Thx,
Nils Kaiser