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

Re: Expression Logic Problem

Subject: Re: Expression Logic Problem
From: "Robert S. Koberg" <rob@xxxxxxxxxx>
Date: Wed, 31 Jul 2002 11:19:31 -0700
Re:  Expression Logic Problem
Hi,

Renick, Garrel wrote:
My data:
<document>
 <configure>
   <server>
     <resultfield id="100">Snow White</resultfield>
     <resultfield id="50">Mickey Mouse</resultfield>
   </server>
 </configure>
 <record>
   <field id="100">Snow White and the Seven Dwarfs</field>
   <field id="100">A story about some dwarves and their friend</field>
   <field id="50">Fantasia</field>
 <record>
</document>


Could you possibly set things up to give you the following XML:

> <document>
>  <configure>
>    <server>
>      <resultfield id="100">Snow White</resultfield>
>      <resultfield id="50">Mickey Mouse</resultfield>
>    </server>
>  </configure>
>  <record>
     <collection id="100">
       <field>Snow White and the Seven Dwarfs</field>
       <field>A story about some dwarves and their friend</field>
     </collection>
     <collection id="50">
       <field>Fantasia</field>
     </collection>
>  <record>
> </document>

Then you can use position()=1.

Or if the order does not matter you could sort by ID and for-each new id you can prepend your string.

best,
-Rob





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.