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

combining property lists with content

Subject: combining property lists with content
From: saodl@xxxxxxxx
Date: Tue, 22 Jan 2002 07:25:58 -0800 (PST)
combining list content
I'm rather new at declarative programming and through
I'm fumbling along okay, I feel there must be a better
way to do this; any help would be appreciated.

I am combining two XML files- one contains a series
of sentances for display one at a time, and the other
contains definitions with various properties which
are associated with the words of these sentances in
a table like so:

The quick         red                fox...
Root of 'quick'   Root               ...etc.
gramatical info   grammar   
pronunciation     pronunciation
...                         ...

The definitions are identified by a 4 digit number,
and associated through this to the words in the other
file.  (The files are seperated because the same definition
might be used many times.)  A sample of the XML from
both files:

-----Text-----
<chapter>
  <p>
    <text defid="4011" grammar="...">The quick</text>
    <text defid="4317" grammar="...">red</text>
    <text defid="2281" grammar="...">fox</text>
     ...
  </p>
   ...
</chapter>
---------------
---Lexicon---
<d_lst>
  <def id="4011" root="QUICK">
    <property1>text</property1>
    <property2>text</property2>
    <property3>text</property3>
    <property4>text</property4>
     ...
  </def>
  <def>...</def>
  ...
</d_lst>
--------------

At the moment I am using a series of for-each statements
to lay out first all the text, then all the roots,
etc. because I can't build the table column by column,
and if I use one cell with a new table inside for each
word I found that the rows don't line up evenly.  This
works, but I find using 8 consecutive for-each statements
with just the property name changed excessively crude.
 Can anyone suggest a more efficient and more elegant
way to go about this?

siri

 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.