Are long XPath statements inherently bad?
2004-10-26 14:17:43
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[(_at_)key='recurring']/item[(_at_)template='event'][(
@yearspecific, . ) != 1 and substring( @date, 5, 4 ) = $moday ) or (
@yearspecific = 1 and substring( @date, 1, 8 ) = $date )] |
$newshome/item[(_at_)key='recurring']/item[(_at_)key=$year]/item[(_at_)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
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Are long XPath statements inherently bad?,
John <=
|
|
|