Re: [xsl] Help moving away from named templates

Subject: Re: [xsl] Help moving away from named templates
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 2 May 2007 17:07:42 +0100
sorry I have no idea what your peceived problem is, Your second example
wasn't well formed, but  assuming custID is formed it is structurally
identical to the first example.

So at that level your question seems to be, how, given two structurally
identical XMl fragments do I arrange them to be processed differently.

It's hard to answer that.

basically you must know (somehow) which processing you need to do in
each case, either you know from some external information, in which case
you can pass in that information as an external parameter to the
stylesheet, or the information is in some other part of the XML which
you haven't shown, in which case you can select it with Xpath.

In either case the logic would appear to be the same whether you are
using named templates or template matching.

> . But doesn't this circumvent the magical property of XSL to pick its
> own darn templates according to the data?

But you seem to be implying that the information is not in the data, so
no.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread