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

compact code using loop

Subject: compact code using loop
From: Mansour <mansour77@xxxxxxxxx>
Date: Wed, 19 Mar 2008 04:36:02 -0300
 compact code using loop
I have repetitive code in my xslt. This code produces a list and does not depend on the input xml. I am wondering if there is a way to minimize this code. I can do it through for-each, but the element are in the xslt file and not in the input xml, so I can not use the 'select='. For example, I need to generate this code regardless of the input xml:

<item>
   <type>type1</type>
   <value>val1</value>
</item>
<item>
   <type>type2</type>
   <value>val2</value>
</item>
<item>
   <type>type3</type>
   <value>val3</value>
</item>


Of course I can use this directly in my xsl file, but there's more item. So the code is too long. And there are more tags for the item. Does that make things clear?


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.