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

Before & after

Subject: Before & after
From: Kim <kimba_40@xxxxxxxxx>
Date: Wed, 25 Sep 2002 23:50:27 -0700 (PDT)
kim thu
Hi,

I am running into a dilemma to print out/combine the result of several
element's value  with the same sibling info. 

Here is a fragment of the xml file:

[...]
<books>
  <publisher> a </publisher>
  <date>
    <author> b1 </author>
    <title name="c1">
      <isbn> 100 </isbn>
    </title>
    <title name="c2">
      <isbn> 101 </isbn>
    </title>
  </date>

  <publisher> a </publisher>
  <date>
    <author> b2 </author>
    <title name="c3">
      <isbn> 102 </isbn>
    </title>
  </date>
  
  [...]


The required output is:

Publisher: a
Author: b1
 title: c1; isbn= 100
 title: c2 ; isbn= 101

Publisher: a
Author: b2
 title: c3; isbn= 102
 

when ALL publisher,author, and title is matched to the order: 
   a, (b1,b2) (c1, c2,c3).



 Precisely, I need to combine all the matched titles under non-duplicated
matched author & publisher.  What approach should I be taking?

The problem I am having is that either the output would be w/ duplicated
Publisher & Author:

Publisher: a
Author: b1
 title: c1; isbn= 100


Publisher: a
Author: b1
 title: c2; isbn= 101

or it would print out the lines of:

Publisher: a
Author: b

when the searched title is "e" which is not a matched title. 

What I want to do is print out only the title when the publisher and author's
info are the same; else (if the author is different; eg. b2) then print out the
publisher, author, and title.  Is there a "before and after" in XSLT?  It is
not a procedural language as I currently understand.  :>)))


Many thanks in advance,

Kim




   


  

=====
Kim

*************************
May the force be with you.
*************************

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • Before & after
    • Kim - Thu, 26 Sep 2002 01:52:28 -0400 (EDT)
      • <Possible follow-ups>
      • Jarno . Elovirta - Thu, 26 Sep 2002 02:09:58 -0400 (EDT)
      • Kim - Thu, 26 Sep 2002 02:48:05 -0400 (EDT) <=

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.