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

Re: Following-sibling - question

Subject: Re: Following-sibling - question
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Jan 2016 14:39:28 -0000
Re:  Following-sibling - question
a kusa akusa8@xxxxxxxxx wrote:
Hello:

I am trying to write some code to find the next X number of following
sibling elements and I am a little stuck.

My input XML file is a table:

<table>

<tbody>
<row>

<entry>1</entry>
</entry>2</entry>

</row>

<row>
<entry>3</entry>
</entry>2</entry>
</row>

<row>
<entry>4</entry>
</entry>2</entry>
</row>

<row>
<entry>5</entry>
</entry>2</entry>
</entry>2</entry>
</row>

<row>
<entry>6</entry>
</row>


</tbody>



</table>



My desired output is:


<table>

<tbody>
<row>

<entry>1</entry>
</entry>2</entry>

</row>

<row>
<entry>want entry here - 1.1</entry>
<entry>3</entry>
</entry>2</entry>
</row>

<row>
<entry>4</entry>
<entry>want an entry here - 3.1 </entry>
</entry>7</entry>
</row>

<row>
<entry>5</entry>
</entry>2</entry>
</entry>2</entry>
<entry>want an entry here - 7.1</entry>
</row>

<row>
<entry>6</entry>
</row>


</tbody>



</table>



So, I want to write logic to say that for the next n where n=3 in this example - rows, add an entry element


What determines the position of the added entry element? It seems that in your sample each new entry is at a different position.
And what determines the content, 1.1, 3.1, 7.1 seems like an odd scheme.


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.