[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

stylesheets without match="*" templates

Subject: stylesheets without match="*" templates
From: Garvin Riensche <g.riensche@xxxxxxx>
Date: Wed, 12 Nov 2008 12:49:58 +0100
 stylesheets without match="*" templates

I am working an a translator for xslt into a certain prolog implementation.
In the implementation it makes a big difference if you want to translate a stylesheet which contains a template like:

<xsl:template match="*">

or not.

If such a template is used, the structure of the result sequence will be similar to the input structure and it is sure that the outpult will be valid XML as there is only one root node (if the input is valid xml).

If such a template is missing, all templates that are not called by an explicit apply-templates will put their first nodes as root nodes. So the result would be like


I think this is not wanted in most cases.

Without going into detail, it's difficult for me to put these nodes into the right order, because their order can't be deduced from the templates.

My question to you is: In practise, how many stylessheets of the second type without a template like the one above exist? My assumption is, that most stylesheets contain such a template, to keep the structure and to secure to get valid XML. If that is true I won't consider stylesheets without template like above in my implementation.

I should say, that I am only interested in Stylesheets that transform data. So stylesheets that compute anything like "Knight's tour" are not on my focus.


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.