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

RE: Formatting elements

Subject: RE: Formatting elements
From: DPawson@xxxxxxxxxxx
Date: Wed, 11 Oct 2000 08:38:46 +0100
vat code 1
> i'm kind of new to this, are you two saying add xml tags for 
> the purpose of
> giving xslt processors a place to grab hold?
> 
> if so, how do you choose where to put these?

Example:

Original information is 3 levels of vat (state tax) available
in a database
    <vat>Vat Code 1 - Zero Rated</vat>
    <vat>Vat Code 2 - Vatable</vat>
    <vat>Vat Code 3 - Variable</vat>

I need to be able to select one of these dependent on another value.

If I have 
<template match="vat">

I'm then (positionally speaking) too low to do anything with them,
I'd need to start hunting for content.

   <rates>
    <vat>Vat Code 1 - Zero Rated</vat>
    <vat>Vat Code 2 - Vatable</vat>
    <vat>Vat Code 3 - Variable</vat>
   </rates>
 
Adding this wrapper, I now match on 'rates'
and can pick any child. 

A further use was to wrap even further, such that when the 
data was used for input, it could be shown as a pull down list
with a default. This gave the following. Now usable in two
different presentations. All solved with *adding* more wrappers.

 <vat>
   <rates>
    <vat>Vat Code 1 - Zero Rated</vat>
    <vat>Vat Code 2 - Vatable</vat>
    <vat>Vat Code 3 - Variable</vat>
   </rates>
   <sel-vat>Vat Code 2 - Vatable</sel-vat>
 </vat>

HTH DaveP


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.