Search the web
Sign In
New User? Sign Up
xrules · XRules & DynamicDOM
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
I found ... :)   Message List  
Reply | Forward Message #50 of 74 |
Hi,
If you want calculate some fields and set result into another xml
element but you don't know that all tag has it. You can use this
XRule.

My XML data :
<Part>
<ID>1</ID>
<FLN ID="F051601001">ÂÓãÇä ÂÈ&#1740;</FLN>
<FLN ID="F051601002">3400</FLN>
<FLN ID="F051601003">40</FLN>
</Part>
<Part>
<ID>2</ID>
<FLN ID="F051601004">
<CFLN ID="1">10</CFLN>
<CFLN ID="2">2</CFLN>
<CFLN ID="3">4</CFLN>
<Total/>
</FLN>
</Part>

and I wrote this XRule : (Some FLN do't have a Total tag)

<?xml version="1.0" encoding="utf-16"?>
<xr:rules xmlns:xr="http://www.xrules.org/2003/11">
<xr:ruleset context="/Questionnaire/PartList/Part/FLN
[Total='']">
<xr:calculate target="Total">
<xr:value>sum(CFLN)</xr:value>
</xr:calculate>
</xr:ruleset>
</xr:rules>

Best regards
Sasan Nikookar




Sun Jan 14, 2007 12:26 am

radobject
Offline Offline
Send Email Send Email

Forward
Message #50 of 74 |
Expand Messages Author Sort by Date

Hi, If you want calculate some fields and set result into another xml element but you don't know that all tag has it. You can use this XRule. My XML data : ...
radobject
Offline Send Email
Jan 14, 2007
3:25 am

Hi Sassan, You found a correct solution. Another way you can use is to create your rules as follows: <xr:ruleset...
Waleed K. Abdulla
waleed_ka
Offline Send Email
Jan 14, 2007
5:41 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help