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

Re: Using values from one node tree to iterate/recurse

Subject: Re: Using values from one node tree to iterate/recurse over another set of nodes. (Newbie Question)
From: Richard Dyce <subscriptions@xxxxxxxx>
Date: Wed, 27 Feb 2008 16:53:06 +0000
Re:  Using values from one node tree to iterate/recurse
On 27 Feb 2008, at 16:35, Martin Honnen wrote:

As at least in your sample the field and record/* elements are in the same order the above might suffice. If not then post back.


Ah, no.

Thing is I *know* it's my scripting language based thinking, but I want the stylesheet to be able to handle a set of records which may be structured differently than the structure element.

A <record> element may have more child data elements than the <structure> has <field> children. I would like the ordering of the <field> elements to be reflected in the table, rather than rely current symmetry.

Perhaps:


<view display="list" controller="story" action="list">
<record_list type="story" total_found="2" page_size="10" page_number="1" last_page="1" begin_record="1" end_record="2">
<structure>
<field name="id" type="id" label="ID" >id</field>
<field name="headline" type="name" label="Headline" >headline</field>
<!-- <field name="bodycopy" type="textarea" label="Bodycopy" >bodycopy</field> to be ommitted from table!!! -->
<field name="picture" type="image" label="Picture" >picture</ field>
</structure>
<record type="story" sig="47c44488b7a614.15734104">
<bodycopy>There was fog in the channel. No French cheese for us.</bodycopy>
<id>2</id>
<headline>Fog in Channel, Europe Cut Off</headline>
<picture>cheese.png</picture>
</record>
<record type="story" sig="47c44488bb80e5.13211401">
<id>1</id>
<picture>dog.png</picture>
<headline>Man Bite Dogs</headline>
<bodycopy>Today a man bit a dog</bodycopy>
</record>
</record_list>
</view>



makes my intention clearer.


Or not? ;-)

--
Richard Dyce MA (Cantab.) MBCS MIET

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-2011 All Rights Reserved.