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

trouble checking "cousins"of current node

Subject: trouble checking "cousins"of current node
From: "Chris d'Aquin" <CDAquin@xxxxxxxxxxx>
Date: Fri, 21 Sep 2001 11:13:49 -0500
trouble checking
I am having a problem. Why else would I be posting, right? ;-)

I have some XML that I can best describe this way.  It is like notes taken
from a college history class.  Each <document> represents one class, and
each subdocument element represents a specific event or time period (i.e.
<war>, <legislation>, <civic-event>,etc.).

One way I want to use this XML is to create one document that contains all
the notes from every class.  However, the professor would sometimes be in
the middle of describing an event when class time was over, so he would
continue it next time.  But next time he wouldn't always start right away
with what was incomplete from before.

The notes have been transcribed into XML just as they were given in class.
I have written a script using XSL to go through and make sure the
subdocument elements that were incomplete in one class have a corresponding
completed element in a following class.  But my problem is when the
professor left something incomplete in one class, talked about something
completely different in the next, and then finished the incomplete topic in
the third class.

<root>
   <document date="2001.06.03">
      <war title="a" complete="yes">
         . . .
      </war>
      <legislation title="b" complete="yes">
         . . .
      </legislation>
      <war title="c" complete="no">
         . . .
      </war>
   </document>
   <document date="2001.06.10">
      <civil-event title="d" complete="yes">
         . . .
      </civil-event>
   </document>
   <document date="2001.06.17">
      <war title="c" complete="continued">
         . . .
      </war>
      <exploration title="e" complete="yes">
         . . .
      </exploration>
   </document>
<root>

Using XSL, I look for all tags that have an @continued="no" and make sure
it is followed by a corresponding tag with @complete="continued" and
matching @title values.  But how can I identify situations above where
<civil-event title="d"> comes between the beginning and end of <war title
="c">?

Thanks,
Chris



 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.