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

Re: Selecting Attribute First Occurrence

Subject: Re: Selecting Attribute First Occurrence
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Tue, 29 Nov 2005 14:47:29 -0600
Re:  Selecting Attribute First Occurrence
Doing a quick scan your problem doesn't seem to be selecting an
attribute, but rather just only printing a symbol if it's the first
time it occurs.

Don't have time to look too deeply into this, but one other comment is
that this might be easier if you actually broke up the templates
somewhat instead of using for-eachs.

Also, displaying a XSLT file that doesn't do what you want isn't
usually as good as displaying the output that you do want, although in
this case scanning it it made sense, kinda.

But why don't you simply check to see if any of the previous elements
have the symbol, and if they don't print the symbol you  need?  It
already looks like you have something similar.

@symbol='lot' and not(ancestor::*/preceding-sibling::row/entry/@symbol='lot')


It's not tested, but it should be enough to get you on the right path.

Another thing you might consider is a two pass solution, one to set it
up into an format without all the rows if they are not needed.

Jon Gorman

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.