This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]