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

Re: retrieve data from #1 xml via data from #2 xml

Subject: Re: retrieve data from #1 xml via data from #2 xml
From: "Walter Torres" <walter@xxxxxxxxx>
Date: Thu, 22 Mar 2001 14:56:53 -0600
retrieve records and fields xml
I need to beat this dead horse one more time, please...


> -----Original Message-----
> From: Jeni Tennison [mailto:mail@xxxxxxxxxxxxxxxx]
> Sent: Wednesday, March 14, 2001 10:58 PM
> To: Walter Torres
> Cc: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  retrive data from #1 xml via data from #2 xml

I defined my variables thus...

 <xsl:variable name="data"
               select="/callEvent//interaction" />

 <xsl:variable name="columns"
               select="document('tableData.xml')/titles/display/@id" />

This works nice.

I get data as I think I should.

> So if you want to iterate over the interaction elements, then you can
> either change it so that the node that the column ids are resolved
> relative to are the events/call_event grandchildren of the interaction
> element with:
>
> <tr>
>    <xsl:for-each select="$data">
>       <xsl:variable name="datum" select="events/call_event" />
>       <xsl:for-each select="$columns">
>          <xsl:variable name="column" select="." />
>          <td>
>             <xsl:value-of select="$datum/*[name() = $column]" />
>          </td>
>       </xsl:for-each>
>    </xsl:for-each>
> </tr>

I finally get what this is doing!

But it's not helping, (well, it mostly is but...)

[   My dummy data has 3 records, 12 fields
    My tabelData has 6 of the above 12 fields
    Thats all I want to see, a sub set
]


My problem with this is that when I run this, I get 3 rows, as I should
but I also get all 12 fields, not just the 6 as defined in tableData.

So I figure I need some conditional in here to see if the current NODE is
part of the tableData NODE set.

I just can't figure how to get that piece of info out of the 'variable' set
I have.

After several days of banging my head against the wall I thought I would ask
for help (again!).

Walter




 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.