[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: determine the number of payment methods and specif
Caroline,
Just to gloss something I just wrote, in order to make it clear: At 10:26 AM 11/4/2008, I wrote: If you want to fix the order of the children of 'paymentMethods', you can do: The deal here is that if you have no 'creditCard' element in your 'paymentMethods', for example, then none will be selected and no template will be applied, hence no 'li' element will be generated for it. This handles all the conditional processing needed, in effect testing whether the 'creditCard' element is present (and creating nothing for it if it isn't). This is why, using the apply-templates approach to your problem, you don't have to do any explicit testing to see whether all three elements are present, or only two (and which two), or only one (and which one), or none at all. Also, because the order of their appearance has been fixed (if they are present at all), the possible permutations in assigning the value to the li/@class in the result are also reduced -- which is lucky for you, since those values are themselves sensitive to the order. Cheers, Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|