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

Re: Reading Attributes in XSL

Subject: Re: Reading Attributes in XSL
From: pankaj.ahuja@xxxxxxxxxxxx
Date: Tue, 15 Nov 2005 12:11:20 -0700
xsl first parent
I apologize for not being so clear for the first time. Just let me know if
you can
understand my problem now:

Problem:
XML to break  into tables having 4 rows

Sample XML:

<?xml version="1.0" encoding="UTF-8"?>

<parent foo="lark" bar="time">
<child foo="1" bar="9" />
<child foo="3" bar="2" />
<child foo="8" bar="0" />
<child foo="1" bar="1" />
</parent>

<parent foo="lark1" bar="time1">
<child foo="3" bar="6" />
<child foo="4" bar="5" />
<child foo="8" bar="0" />
<child foo="1" bar="1" />
</parent>

<parent foo="lark2" bar="time2">
<child foo="1" bar="9" />
<child foo="3" bar="2" />
<child foo="8" bar="0" />
<child foo="1" bar="1" />
</parent>

<parent foo="lark3" bar="time3">
<child foo="1" bar="9" />
<child foo="3" bar="2" />
<child foo="8" bar="0" />
<child foo="1" bar="1" />
</parent>

Result desired:
1. Want to break this into table using XSL(XPATH) having 4 rows
each (Including Attributes of parent as well as Child
elements of Parent)

2.I want structure like this:


Lark        --(This one is the 1st attribute of first parent)
1     9
3     2
8     0

(New Table after this as this shd break after 4 records)

1     1
time        --(This one is the 2nd attribute of first parent)
lark1       --(This one is the 1st attribute of second parent)
3     6

(New Table after this as this shd break after 4 records)

4     5
8     0
1     1
time1

(Page Break after this as this shd break after 4 records)



Problem Solving:


I cannot get this to work where it is needed to first read
the first attribute and then all attributes of the child and then
back to reading the second attribute of the parent element. Also how
to keep track of next items by restricting count of rows per table to just
4.

I hope I am clear this time.

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.