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

Are long XPath statements inherently bad?

Subject: Are long XPath statements inherently bad?
From: John <john-xsl-list@xxxxxxxx>
Date: Tue, 26 Oct 2004 14:17:43 -0700
xpath statements
Sorry again, I am relatively new to XSL. I am trying to put together of events as a table by outputting a list of items in each cell by executing queries such as the following (this is actually simplified):

select="$newshome/item[@key='recurring']/item[@template='event'][( @yearspecific, . ) != 1 and substring( @date, 5, 4 ) = $moday ) or ( @yearspecific = 1 and substring( @date, 1, 8 ) = $date )] | $newshome/item[@key='recurring']/item[@key=$year]/item[@template='event'][( @yearspecific != 1 and substring( @date, 5, 4 ) = $moday ) or ( @yearspecific = 1 and substring( @date, 1, 8 ) = $date )]

Is it just my syntax/logic that's bad or is there some better way I could/should do this? The requirements for including events for a date are actually pretty complex - this is just one of a series of queries (which I would be happy to share!) to get events for a date. Are long XPath statements always bad, other than just the possible readability issue?

The calendar does have performance issues and I will probably rewrite it in .NET. Would you expect XSL extensions to be helpful here, or just use pure .NET (maybe an ASCX) or something I'm not thinking of?

I probably need to convert this to CSS positioning and I'm not sure if that would help with the problem or make it harder.

Thanks in advance,

-John

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.