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
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