Altova Mailing List Archives


[xsl] Porting own template language to xslt

From: Nils Kaiser <NilsKaiser@------>
To:
Date: 3/16/2006 10:38:00 AM
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

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.