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

RE: RE: RE: Hello, some problems with XSL-FO

Subject: RE: RE: RE: Hello, some problems with XSL-FO
From: cknell@xxxxxxxxxx
Date: Fri, 19 Dec 2003 15:14:41 -0500
xsl fo summing a group
It seems that the information required to make a table of contents is considerably less than what you supplied in your XML document "courses.xml". I'll take the liberty to strip off what appears to be excess in order to make the problem simpler to understand. Does this sample contain all the information required to make the table of contents?

<dce_courses>
  <course acad_year="2003" term_id="2" crn="21135">
    <course_group>AFAM</course_group>
    <course_num>E-110</course_num>
    <title>Images of Africana People in Cinema</title>
  </course>
  <course acad_year="2003" term_id="2" crn="22066">
    <course_group>ANTH</course_group>
    <course_num>E-135</course_num>
    <title>The Archaeology of the American Southwest</title>
  </course>
<dce_courses>

If it contains anything not strictly needed to illuminate the table of contents issue, please feel free to strip it further. If I have removed something necessary to understanding the problem, please put it back and re-post.

If I understand you correctly, you want to select the subset of all courses that have a <course_group> child whose value is equal to the "group" parameter and whose "acad_year" attribute is equal to the "year" parameter you pass to the stylesheet. Is that correct? The XPath expression would be like, "course[@acad_year=$year][course_group=$group]".

In SQL terms we might say "SELECT course FROM courses WHERE course_group = $group and acad_year = $year". That would give us the set of courses you are interested in. 

Now let's look at the problem of duplicates. Based on the values of which elements and attributes would you judge that two courses are duplicates?


-- 
Charles Knell
cknell@xxxxxxxxxx - email

 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.