Due to enormous amounts of spam, the forum has been set to read-only mode.



Reply to topic  [ 6 posts ] 
CMD:Count question 
Author Message
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post CMD:Count question

How do I test the result of a CMD:Count instruction?

Code:
<xsl:if test="##CMD:Count:track,title=<xsl:value-of select="title"/>## !='0'">
   <xsl:text> [##CMD:Count:track,title=<xsl:value-of select="title"/>##] </xsl:text>
</xsl:text>


Sablotron does not like this code.

Can I assign the result to a variable?

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Wed Jun 02, 2010 7:09 pm
Profile WWW
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: CMD:Count question

hamsen wrote:
How do I test the result of a CMD:Count instruction?

Code:
<xsl:if test="##CMD:Count:track,title=<xsl:value-of select="title"/>## !='0'">
   <xsl:text> [##CMD:Count:track,title=<xsl:value-of select="title"/>##] </xsl:text>
</xsl:text>


Sablotron does not like this code.

Can I assign the result to a variable?

Sorry, but this is simply not possible. Count/Sum commands are processed by CATraxx after the html page has been generated. To process the result of Count/Sum command with xslt code the result of the calculation needs to be included in the xml data file. I have added this issue to the wish list for version 9, but honestly, I'm not entirely sure how to implement this...

_________________
Fredrik Nordbakke
www.fnprg.com


Thu Jun 03, 2010 10:36 am
Profile WWW
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: CMD:Count question

FredrikN wrote:
hamsen wrote:
How do I test the result of a CMD:Count instruction?

Code:
<xsl:if test="##CMD:Count:track,title=<xsl:value-of select="title"/>## !='0'">
   <xsl:text> [##CMD:Count:track,title=<xsl:value-of select="title"/>##] </xsl:text>
</xsl:text>


Sablotron does not like this code.

Can I assign the result to a variable?

Sorry, but this is simply not possible. Count/Sum commands are processed by CATraxx after the html page has been generated. To process the result of Count/Sum command with xslt code the result of the calculation needs to be included in the xml data file. I have added this issue to the wish list for version 9, but honestly, I'm not entirely sure how to implement this...


That's ok. I wish you good luck. :grin:

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Sun Jun 06, 2010 10:38 am
Profile WWW
User avatar

Joined: Wed Oct 01, 2003 6:03 am
Posts: 437
Location: Melbourne, Victoria - Australia - v9.05.02
Post Re: CMD:Count question

Hi Thomas & Fredrik,

Thanks for your efforts - I guess zero supression isn't all that important - I am very happy with the present results.

Regards,

Inno

_________________
Vista/XP - V9.10


Mon Jun 07, 2010 12:05 am
Profile
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: CMD:Count question

FredrikN wrote:
hamsen wrote:
How do I test the result of a CMD:Count instruction?

Code:
<xsl:if test="##CMD:Count:track,title=<xsl:value-of select="title"/>## !='0'">
   <xsl:text> [##CMD:Count:track,title=<xsl:value-of select="title"/>##] </xsl:text>
</xsl:text>


Sablotron does not like this code.

Can I assign the result to a variable?

Sorry, but this is simply not possible. Count/Sum commands are processed by CATraxx after the html page has been generated. To process the result of Count/Sum command with xslt code the result of the calculation needs to be included in the xml data file. I have added this issue to the wish list for version 9, but honestly, I'm not entirely sure how to implement this...


Could it be done using a ? directive?
Like this:
<?data count="fieldname","##CMD:Count:track,title=<xsl:value-of select="title"/>##"?>

I guess the problem here would be the value of "title".

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Wed Jun 20, 2012 11:26 am
Profile WWW
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: CMD:Count question

hamsen wrote:
FredrikN wrote:
hamsen wrote:
How do I test the result of a CMD:Count instruction?

Code:
<xsl:if test="##CMD:Count:track,title=<xsl:value-of select="title"/>## !='0'">
   <xsl:text> [##CMD:Count:track,title=<xsl:value-of select="title"/>##] </xsl:text>
</xsl:text>


Sablotron does not like this code.

Can I assign the result to a variable?

Sorry, but this is simply not possible. Count/Sum commands are processed by CATraxx after the html page has been generated. To process the result of Count/Sum command with xslt code the result of the calculation needs to be included in the xml data file. I have added this issue to the wish list for version 9, but honestly, I'm not entirely sure how to implement this...


Could it be done using a ? directive?
Like this:
<?data count="fieldname","##CMD:Count:track,title=<xsl:value-of select="title"/>##"?>

I guess the problem here would be the value of "title".

Yes, this would make it impossible to use "dynamic" filters.

_________________
Fredrik Nordbakke
www.fnprg.com


Wed Jun 20, 2012 12:01 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.