473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

xslt too many variables in select..

I've got this piece of code which selects the right 'PubObjects' from my
xml-file, given the variables the user has selected. But because there
are more than 200 PubObjects, it's not very fast because the variables
get checked for every PubObject.

I want only the variables checked that the user selected to be checked.
If they are not the variables are zero. But because I can't put an if
statement inside the apply-templates tags, I don't know what to do. Can
anyone help? (I hope I made the problem clear)

This is the piece of xsl:

<xsl:apply-templates select="PubObject[(subject=$subject or
$subject='all')
and
(
($klas1=targetGroup/group or $klas2=targetGroup/group
or $klas3=targetGroup/group or $klas4=targetGroup/group
or $klas5=targetGroup/group or $klas6=targetGroup/group)

or
($vmbobb=targetGroup/school or $vmbokg=targetGroup/school
or $vmbot=targetGroup/school or $havo=targetGroup/school
or $vwo=targetGroup/school or $basisschool=targetGroup/school)

or ($vmbobb1=targetGroup or $vmbobb2=targetGroup
or $vmbobb3=targetGroup or $vmbobb4=targetGroup
or $vmbokg1=targetGroup or $vmbokg2=targetGroup
or $vmbokg3=targetGroup or $vmbokg4=targetGroup
or $vmbot1=targetGroup or $vmbot2=targetGroup
or $vmbot3=targetGroup or $vmbot4=targetGroup
or $havo1=targetGroup or $havo2=targetGroup
or $havo3=targetGroup or $havo4=targetGroup
or $havo5=targetGroup or $vwo1=targetGroup
or $vwo2=targetGroup or $vwo3=targetGroup
or $vwo4=targetGroup or $vwo5=targetGroup
or $vwo6=targetGroup)
)
and (number &gt;= $vanaf and number &lt;= $tot)
and (language/version &gt; 1)]">

<xsl:sort order="{$order}"
select="language[lang($language)]/title"/>
</xsl:apply-templates>
Jul 20 '05 #1
0 850

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Pete | last post by:
I am just getting to grips with XML and I was wondering if you could help me with something that no-one seems able or willing to help with.. I have an XSLT file which should be transforming a...
2
by: ted | last post by:
Was wondering if XSLT alone is appropriate for the following situation. From XML, I'm creating a small website (around 50 pages) with pages that link to each other through a nav menu and a...
13
by: Martin | last post by:
I have 5 days of experince with XSLT and I am sure my problem is pretty much as basic as they come but I cannot work it out, so I hope someone will take pity on me - please! I have inherited an...
4
by: Frederik Sørensen | last post by:
I include a xslt stylesheet with variables for all the error messages in my system. <xsl:variable name="Banner_error_1"> errormessage 1 for banner </xsl:variable> <xsl:variable...
1
by: Ralph Snart | last post by:
i'm trying to do the classic alternating table row colors trick. i can't use position() mod 2 in this case because sometimes the template is called but it decides not to print the particular...
1
by: Oleg Konovalov | last post by:
Hi, I am new to XSLT, trying to significantly modify somebody else's XSL. That is not 2.0. I need to create min & max variable(s) to be used in many templates and sub-templates based on...
12
by: Keith Chadwick | last post by:
I have a fairly hefty XSLT file that for the sake of debugging and clarity I wish to split into some separate sub-templates contained within the same file. The master template calls an...
0
by: SamStamport | last post by:
Hello, I have coded a C# program that passes an argument list to my XSLT file. I get no errors, but I don't get any output either. Here's what I want to do: pass a parameter that is an XPath...
2
jkmyoung
by: jkmyoung | last post by:
Here's a short list of useful xslt general tricks that aren't taught at w3schools. Attribute Value Template Official W3C explanation and example This is when you want to put dynamic values...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.