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

Can I add new element?

Subject: Can I add new element?
From: "Caras, Yuko" <Yuko_Caras@xxxxxxxxxxxxxxxxx>
Date: Mon, 31 Jul 2000 13:52:47 -0700
xsl to add new elements
Thanks, David.  Here is more detailed information.

I'm trying to generage output into wml.  When a return from database is more
than 7, new element is added and also insert a new card.  

For example, xml is

<?xml version="1.0"?>
<book>
  <title>a</title>
  <title>b</title>
  <title>c</title>
  <title>d</title>
  <title>e</title>
  <title>f</title>
  <title>g</title>
  <title>h</title>
  <title>i</title>
  <title>j</title>
  <title>k</title>
  <title>l</title>
  <title>m</title>
</book>  

and the output in wml is

<wml>
  <card id=1>
    <select>
	  <choice>a</choice>
	  <choice>b</choice>
	  <choice>c</choice>
	  <choice>d</choice>
	  <choice>e</choice>
	  <choice>f</choice>
	  <choice>g</choice>
	  <choice onpick="#2">More</choice>
	</select>
  </card>
  <card id=2>
    <select>
	  <choice>h</choice>
	  <choice>i</choice>
	  <choice>j</choice>
	  <choice>k</choice>
	  <choice>l</choice>
	  <choice>m</choice>
	</select>
  </card>
</wml>

So, The first page returns records 0-6 with a link including 7 as it's start
index. The second page returns records 7-13 with a link including 14 as it's
start index. This goes on until we get to records 7i through n where i =
(0,1,2 ... n / 7) and no link. These records are queried every time since
there is no guaruntee of symmetry of the records, but only the start index
through the end index is displayed. 

I kind of figured out the way to separate into different cards, but I'm very
stuck about inserting "More".  Is this possible to do with xsl?  

Appreciate for your help!!!

Yuko


 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.