[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Formatting elements
> 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
|
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
|