I would like to extract the rules surrounding how commissions for sales reps are
calculated when they sell a loan product. While it will increase in complexity,
here's an example XML file:
(Ignore the periods - I added them to format this HTML posting)
<MonthlyLoans>
. <Loan>
... <Rep>Sally</Rep>
... <State>NC</State>
... <Amount>150000</Amount>
... <LoanType>HELOC</LoanType>
. </Loan>
. <Loan>
... <Rep>Joe</Rep>
... <State>SC</State>
... <Amount>150000</Amount>
... <LoanType>Construction</LoanType>
. </Loan>
</MonthlyLoans>
How would the Rules file need to be coded to calculate a Commission where the
loan sold in 'NC' would receive 0.5% while the Commission sold in SC would
receive 0.4%?
Also, the tutorial for coding in C# is Great. But, where can I find
documentation regarding tags, parameters, etc for the Rules (.xr) file?
I was wondering if someone could spell out the differences between
XRules and Schematron. I know that XRules has the added functionality
that it can dynamically update an XML document but when it comes to
rule evaluation what are the main differences. Secondly what is the
support for XRules in Java.
Hi
I'm working with XRule for my project. it's so good but I have a
problem with regular expression. I have a tag with string value. I want
user can insert null, blank and any char between 0( for null ) till 256
characters and this regular runs on XRule.
Any body can help ?
Thank you Waleed and David for your valueble comments.
I am going to start with making it work with .net. Obiviously my other
challenge is being able to capture all validatiton rules for business
in Xrules.
As long as I can capture our business rules in a structured document
(in a mathematical way), I am willing to invest time to build logic to
process it.
Waleed K. Abdulla wrote:
>
> I agree with Dave’s comment that XRules is suitable for the .NET
> platform because there is only a .NET implementation right now.
> However, in terms of speed, I would argue that XRules is faster than
> Schematron. I haven’t done any testing, but I’m basing my opinion on
> the following:
>
> 1. Schematron also loads the whole XML document into memory (that’s
> necessary to implement XSLT transformations, which are used
> behind the scenes)
> 2. XRules doesn’t do any XSLT transformations and therefore escapes
> these resource-intensive operations. On the other hand,
> Schematron performs two XSLT transformations for each validation.
> 3. XRules provides syntax to easily select the nodes and context in
> which XPath expressions work, while in Schamtron all expressions
> are global. Therefore, you’ll notice that XRules expressions are
> consistently smaller and easier to write and read than
> Scheamtron expressions. And, expectedly, simpler expressions run
> faster.
>
> And, other than performance, XRules provides many features that are
> impossible to implement in Schematron due to it’s dependency on XSLT.
> Obviously, dynamic validation and dynamic node updates are the most
> obvious, but also XRules Properties, simpler expressions, and more
> built-in rules.
>
Yep, agree with all of these. However, how XSLT is implemented varies
from implementation to implementation. Plus, unless you implement SAXON
.NET, there is still no support for XPath 2.0, which is much improved
over XPath 1.0. Regardless, XRules is still a very good rule engine...
Now if it just worked with Java. :)
Dave
I agree
with Dave’s comment that XRules is suitable for the .NET platform because
there is only a .NET implementation right now. However, in terms of speed, I would
argue that XRules is faster than Schematron. I haven’t done any testing,
but I’m basing my opinion on the following:
Schematron also loads the whole
XML document into memory (that’s necessary to implement XSLT
transformations, which are used behind the scenes)
XRules doesn’t do any
XSLT transformations and therefore escapes these resource-intensive operations.
On the other hand, Schematron performs two XSLT transformations for each validation.
XRules provides syntax to
easily select the nodes and context in which XPath expressions work, while
in Schamtron all expressions are global. Therefore, you’ll notice
that XRules expressions are consistently smaller and easier to write and
read than Scheamtron expressions. And, expectedly, simpler expressions run
faster.
And, other than performance, XRules provides
many features that are impossible to implement in Schematron due to it’s
dependency on XSLT. Obviously, dynamic validation and dynamic node updates are
the most obvious, but also XRules Properties, simpler expressions, and more
built-in rules.
Regards,
Waleed
-----Original Message----- From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of David
Carver Sent: Sunday, March 25, 2007 7:01
AM To: xrules@yahoogroups.com Subject: Re: [xrules] Re: Using
Xrules, schema and XML to maintain CRUD for an application
Ravi wrote:
> Waleed,
>
> Thanks for your response..
>
> Our backend parameter data is exposed as XML documents for other
> groups to build a CRUD application. These groups use thick or thin
> clients. So, we have multiple front ends for the one backend.
> My goal is to encapsualte all data validation rules in one place,
> not
> have them spread all over.
>
> Examples of business rules i am talking about here are:
> 1. Product type:
> 2. prouct days
>
> -Valid values for prodcut type are A, B, C
> -Valid values for prodcut days are 01, 04, 10, 07
> -Cross validate type and days. If type =A, days must be less than
> 10. If type = B, days must be greater than 02.
>
> If I can encapsulate these types of rules in a structured document
> (such as xrules doc), then all my front end developers can build
> their applications(using the xml data doc and xrules doc) to
> capture data from users and will send the xml data doc back to the
> backend.
>
> With this approach, If I want to add any new parameters, it will be
> very dynamic. If I want to change a rule, its easier to implement. I
> just have to release a new xrules doc every time there is a new
> release of the software.
>
XRules would be my first choice for a Windows platform, with small data
sets. Reason I say small data sets is that it loads items into a DOM,
which means it's in memory to do the validation.
An alternative that you could explore as well, would be ISO Schematron.
Which isn't tied to .NET. XRules does have the advanatge in being able
to dynamically update the DOM with new values, where as Schematron is
only doing validations and no dynamic updates.
One other advantage for Schematron is that you can use XPath 2.0.
XRules would need to be updated to use the SAXON .NET framework in order
to get access to the XPath 2.0 support.
Ravi wrote:
> Waleed,
>
> Thanks for your response..
>
> Our backend parameter data is exposed as XML documents for other
> groups to build a CRUD application. These groups use thick or thin
> clients. So, we have multiple front ends for the one backend.
> My goal is to encapsualte all data validation rules in one place,
> not
> have them spread all over.
>
> Examples of business rules i am talking about here are:
> 1. Product type:
> 2. prouct days
>
> -Valid values for prodcut type are A, B, C
> -Valid values for prodcut days are 01, 04, 10, 07
> -Cross validate type and days. If type =A, days must be less than
> 10. If type = B, days must be greater than 02.
>
> If I can encapsulate these types of rules in a structured document
> (such as xrules doc), then all my front end developers can build
> their applications(using the xml data doc and xrules doc) to
> capture data from users and will send the xml data doc back to the
> backend.
>
> With this approach, If I want to add any new parameters, it will be
> very dynamic. If I want to change a rule, its easier to implement. I
> just have to release a new xrules doc every time there is a new
> release of the software.
>
XRules would be my first choice for a Windows platform, with small data
sets. Reason I say small data sets is that it loads items into a DOM,
which means it's in memory to do the validation.
An alternative that you could explore as well, would be ISO Schematron.
Which isn't tied to .NET. XRules does have the advanatge in being able
to dynamically update the DOM with new values, where as Schematron is
only doing validations and no dynamic updates.
One other advantage for Schematron is that you can use XPath 2.0.
XRules would need to be updated to use the SAXON .NET framework in order
to get access to the XPath 2.0 support.
Just some things to think about.
Dave
This is a good use
case. Sure, you can encapsulate your validations in an XRules document and use
it on the client to validate the XML data. All you need is the DynamicDom DLL
on the client. And then you create a mechanism to push the updated XRules to
the client when there are changes in business rules (or have the client
periodically download the latest XRules file).
And, yes, the three
types of validations you mentioned can be expressed with XRules.
Regards,
Waleed
-----Original Message----- From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of Ravi Sent: Friday, March 23, 2007 6:59
AM To: xrules@yahoogroups.com Subject: [xrules] Re: Using
Xrules, schema and XML to maintain CRUD for an application
Waleed,
Thanks for your response..
Our backend parameter data is exposed as XML documents for other
groups to build a CRUD application. These groups use thick or thin
clients. So, we have multiple front ends for the one backend.
My goal is to encapsualte all data validation rules in one place,
not
have them spread all over.
Examples of business rules i am talking about here are:
1. Product type:
2. prouct days
-Valid values for prodcut type are A, B, C
-Valid values for prodcut days are 01, 04, 10, 07
-Cross validate type and days. If type =A, days must be less than
10. If type = B, days must be greater than 02.
If I can encapsulate these types of rules in a structured document
(such as xrules doc), then all my front end developers can build
their applications(using the xml data doc and xrules doc) to
capture data from users and will send the xml data doc back to the
backend.
With this approach, If I want to add any new parameters, it will be
very dynamic. If I want to change a rule, its easier to implement. I
just have to release a new xrules doc every time there is a new
release of the software.
hope this helps..
--- In xrules@yahoogroups.com,
"Waleed K. Abdulla"
<waleed_abdulla@...> wrote:
>
> Ravi,
>
> I'm not sure I fully understand your proposed approach. XRules
is
> suitable for encoding and executing business rules on XML
documents. Are you
> doing CRUD on XML documents? And, how do you enter the data? Are
your
> parameters calculated values based on other parameters?
>
>
>
> Regards,
>
> Waleed
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com]
On
Behalf Of
> Ravi
> Sent: Wednesday, March 21, 2007 10:42 AM
> To: xrules@yahoogroups.com
> Subject: [xrules] Using Xrules, schema and XML to maintain CRUD
for an
> application
>
>
>
> Hello all..
>
> I am fairly new to xrules. seems like an interesting concept and
may
> solve the problem I am trying to resolve. I am trying to design a
web
> based application. Part of that is to CRUD(create, read, update,
> delete) a few thousand parameters(about 5000). Given the number, I
am
> looking for a dynamic way of doing this rather than coding for all
the
> parameters.
>
> I am aware that we have to sitdown and prepare the xrules data.
But
> this is my attempt to capture all that metadata in xrules and
being
> able to resue it for other front ends(for a thick client, or
different
> os, or a future front end).
>
> 1) has anyone done this type of stuff before?
> 2) is there any fundamental flaw in this approach?
> 3) is there any toolset to acheive this with minimal coding effort?
>
> Please share any thoughts..
>
>
>
> Messages
>
<http://groups.yahoo.com/group/xrules/message/64;_ylc=X3oDMTMxbnZyMTc
4BF9TAz
>
k3MzU5NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARtc2dJZAM2NAR
zZWMDZn
> RyBHNsawN2dHBjBHN0aW1lAzExNzQ1MzIzODkEdHBjSWQDNjQ-> in
this topic
(1)
>
<http://groups.yahoo.com/group/xrules/post;_ylc=X3oDMTJvN3EyNDlrBF9TA
zk3MzU5
>
NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARtc2dJZAM2NARzZWMDZ
nRyBHNs
> awNycGx5BHN0aW1lAzExNzQ1MzIzODk-?act=reply&messageNum=64>
Reply
(via web
> post) | Start
>
<http://groups.yahoo.com/group/xrules/post;_ylc=X3oDMTJmajRkbGNyBF9TA
zk3MzU5
>
NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNud
HBjBHN0
> aW1lAzExNzQ1MzIzODk-> a new topic
>
> Messages
>
<http://groups.yahoo.com/group/xrules/messages;_ylc=X3oDMTJmMW0wZWo1B
F9TAzk3
>
MzU5NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsa
wNtc2dz
> BHN0aW1lAzExNzQ1MzIzODk-> | Members
>
<http://groups.yahoo.com/group/xrules/members;_ylc=X3oDMTJmYTllbGptBF
9TAzk3M
>
zU5NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsaw
NtYnJzB
> HN0aW1lAzExNzQ1MzIzODk->
>
>
>
<http://groups.yahoo.com/;_ylc=X3oDMTJlZ3RoN2JsBF9TAzk3MzU5NzE0BGdycE
lkAzE0N
>
zY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTE3ND
UzMjM4O
> Q--> Yahoo! Groups
> Change
>
<http://groups.yahoo.com/group/xrules/join;_ylc=X3oDMTJnaG0yYzFxBF9TA
zk3MzU5
>
NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNzd
G5ncwRz
> dGltZQMxMTc0NTMyMzg5> settings via the Web (Yahoo! ID required)
> Change settings via email: Switch
> <mailto:xrules-digest@yahoogroups.com?subject=Email%20Delivery:%
20Digest>
> delivery to Daily Digest | Switch
> <mailto:xrules-traditional@yahoogroups.com?subject=Change%
20Delivery%20Forma
> t:%20Traditional> format to Traditional
> Visit
>
<http://groups.yahoo.com/group/xrules;_ylc=X3oDMTJlbGV2ZWxuBF9TAzk3Mz
U5NzE0B
>
GdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNocGYEc3
RpbWUDM
> TE3NDUzMjM4OQ--> Your Group | Yahoo! Groups
> <http://docs.yahoo.com/info/terms/>
Terms of Use | Unsubscribe
> <mailto:xrules-unsubscribe@yahoogroups.com?subject=>
>
> Recent Activity
>
Waleed,
Thanks for your response..
Our backend parameter data is exposed as XML documents for other
groups to build a CRUD application. These groups use thick or thin
clients. So, we have multiple front ends for the one backend.
My goal is to encapsualte all data validation rules in one place,
not
have them spread all over.
Examples of business rules i am talking about here are:
1. Product type:
2. prouct days
-Valid values for prodcut type are A, B, C
-Valid values for prodcut days are 01, 04, 10, 07
-Cross validate type and days. If type =A, days must be less than
10. If type = B, days must be greater than 02.
If I can encapsulate these types of rules in a structured document
(such as xrules doc), then all my front end developers can build
their applications(using the xml data doc and xrules doc) to
capture data from users and will send the xml data doc back to the
backend.
With this approach, If I want to add any new parameters, it will be
very dynamic. If I want to change a rule, its easier to implement. I
just have to release a new xrules doc every time there is a new
release of the software.
hope this helps..
--- In xrules@yahoogroups.com, "Waleed K. Abdulla"
<waleed_abdulla@...> wrote:
>
> Ravi,
>
> I'm not sure I fully understand your proposed approach. XRules
is
> suitable for encoding and executing business rules on XML
documents. Are you
> doing CRUD on XML documents? And, how do you enter the data? Are
your
> parameters calculated values based on other parameters?
>
>
>
> Regards,
>
> Waleed
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: xrules@yahoogroups.com [mailto:xrules@yahoogroups.com] On
Behalf Of
> Ravi
> Sent: Wednesday, March 21, 2007 10:42 AM
> To: xrules@yahoogroups.com
> Subject: [xrules] Using Xrules, schema and XML to maintain CRUD
for an
> application
>
>
>
> Hello all..
>
> I am fairly new to xrules. seems like an interesting concept and
may
> solve the problem I am trying to resolve. I am trying to design a
web
> based application. Part of that is to CRUD(create, read, update,
> delete) a few thousand parameters(about 5000). Given the number, I
am
> looking for a dynamic way of doing this rather than coding for all
the
> parameters.
>
> I am aware that we have to sitdown and prepare the xrules data.
But
> this is my attempt to capture all that metadata in xrules and
being
> able to resue it for other front ends(for a thick client, or
different
> os, or a future front end).
>
> 1) has anyone done this type of stuff before?
> 2) is there any fundamental flaw in this approach?
> 3) is there any toolset to acheive this with minimal coding effort?
>
> Please share any thoughts..
>
>
>
> Messages
>
<http://groups.yahoo.com/group/xrules/message/64;_ylc=X3oDMTMxbnZyMTc
4BF9TAz
>
k3MzU5NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARtc2dJZAM2NAR
zZWMDZn
> RyBHNsawN2dHBjBHN0aW1lAzExNzQ1MzIzODkEdHBjSWQDNjQ-> in this topic
(1)
>
<http://groups.yahoo.com/group/xrules/post;_ylc=X3oDMTJvN3EyNDlrBF9TA
zk3MzU5
>
NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARtc2dJZAM2NARzZWMDZ
nRyBHNs
> awNycGx5BHN0aW1lAzExNzQ1MzIzODk-?act=reply&messageNum=64> Reply
(via web
> post) | Start
>
<http://groups.yahoo.com/group/xrules/post;_ylc=X3oDMTJmajRkbGNyBF9TA
zk3MzU5
>
NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNud
HBjBHN0
> aW1lAzExNzQ1MzIzODk-> a new topic
>
> Messages
>
<http://groups.yahoo.com/group/xrules/messages;_ylc=X3oDMTJmMW0wZWo1B
F9TAzk3
>
MzU5NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsa
wNtc2dz
> BHN0aW1lAzExNzQ1MzIzODk-> | Members
>
<http://groups.yahoo.com/group/xrules/members;_ylc=X3oDMTJmYTllbGptBF
9TAzk3M
>
zU5NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsaw
NtYnJzB
> HN0aW1lAzExNzQ1MzIzODk->
>
>
>
<http://groups.yahoo.com/;_ylc=X3oDMTJlZ3RoN2JsBF9TAzk3MzU5NzE0BGdycE
lkAzE0N
>
zY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTE3ND
UzMjM4O
> Q--> Yahoo! Groups
> Change
>
<http://groups.yahoo.com/group/xrules/join;_ylc=X3oDMTJnaG0yYzFxBF9TA
zk3MzU5
>
NzE0BGdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNzd
G5ncwRz
> dGltZQMxMTc0NTMyMzg5> settings via the Web (Yahoo! ID required)
> Change settings via email: Switch
> <mailto:xrules-digest@yahoogroups.com?subject=Email%20Delivery:%
20Digest>
> delivery to Daily Digest | Switch
> <mailto:xrules-traditional@yahoogroups.com?subject=Change%
20Delivery%20Forma
> t:%20Traditional> format to Traditional
> Visit
>
<http://groups.yahoo.com/group/xrules;_ylc=X3oDMTJlbGV2ZWxuBF9TAzk3Mz
U5NzE0B
>
GdycElkAzE0NzY4ODU0BGdycHNwSWQDMTcwNjAzMDM5MARzZWMDZnRyBHNsawNocGYEc3
RpbWUDM
> TE3NDUzMjM4OQ--> Your Group | Yahoo! Groups
> <http://docs.yahoo.com/info/terms/> Terms of Use | Unsubscribe
> <mailto:xrules-unsubscribe@yahoogroups.com?subject=>
>
> Recent Activity
>
I’m not sure I fully understand
your proposed approach. XRules is suitable for encoding and executing business
rules on XML documents. Are you doing CRUD on XML documents? And, how do you
enter the data? Are your parameters calculated values based on other
parameters?
Regards,
Waleed
-----Original Message----- From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of Ravi Sent: Wednesday, March 21, 2007
10:42 AM To: xrules@yahoogroups.com Subject: [xrules] Using Xrules,
schema and XML to maintain CRUD for an application
Hello all..
I am fairly new to xrules. seems like an interesting concept and may
solve the problem I am trying to resolve. I am trying to design a web
based application. Part of that is to CRUD(create, read, update,
delete) a few thousand parameters(about 5000). Given the number, I am
looking for a dynamic way of doing this rather than coding for all the
parameters.
I am aware that we have to sitdown and prepare the xrules data. But
this is my attempt to capture all that metadata in xrules and being
able to resue it for other front ends(for a thick client, or different
os, or a future front end).
1) has anyone done this type of stuff before?
2) is there any fundamental flaw in this approach?
3) is there any toolset to acheive this with minimal coding effort?
Hello all..
I am fairly new to xrules. seems like an interesting concept and may
solve the problem I am trying to resolve. I am trying to design a web
based application. Part of that is to CRUD(create, read, update,
delete) a few thousand parameters(about 5000). Given the number, I am
looking for a dynamic way of doing this rather than coding for all the
parameters.
I am aware that we have to sitdown and prepare the xrules data. But
this is my attempt to capture all that metadata in xrules and being
able to resue it for other front ends(for a thick client, or different
os, or a future front end).
1) has anyone done this type of stuff before?
2) is there any fundamental flaw in this approach?
3) is there any toolset to acheive this with minimal coding effort?
Please share any thoughts..
True. An implementation of "include" functionality is on the to-do list.
However, XRules provides an added capability to attach multiple XRules
documents to one XML at the same time to allow for the following common
scenario:
- A standards organization has some general rules that all XML documents
must comply with.
- An organization has its own rules that add to the restrictions set by the
standards organization (e.g. limit an enumeration list, or make an optional
element required).
- The organization wants to keep the two XRules documents separate so
changes to one does not need to be coordinated with changes to the other.
When using <include>, the parent document and all the included documents
are treated as one big document. It's useful when you have too many rules
and you want to separate them into multiple files. However, this other
functionality in XRules treats each XRules document separately and allows
you to attach/detach each one separately at run time.
Regards,
Waleed
-----Original Message-----
From: xrules@yahoogroups.com [mailto:xrules@yahoogroups.com] On Behalf Of
David Carver
Sent: Wednesday, January 17, 2007 10:06 AM
To: xrules@yahoogroups.com
Subject: Re: [xrules] Re: Include or Import in XRule
Waleed K. Abdulla wrote:
>
> That's actually easy. DDOM Supports attaching multiple XRules
> documents to one XML document at the same time. No need to use
> <Include> for this; just call the "XRulesDocuments.Add()" method
> multiple times; once for each XRules document you want to attach.
>
> dxml.XRulesDocuments.Add(xrulesDoc1);
>
> dxml.XRulesDocuments.Add(xrulesDoc2);
>
> dxml.XRulesDocuments.Add(xrulesDoc3);
>
Implementing either an XInclude or a xrules specific include would be
more in following with what other XML languages implement, like XML
Schema and XSLT.
Dave
Yahoo! Groups Links
Waleed K. Abdulla wrote:
>
> That’s actually easy. DDOM Supports attaching multiple XRules
> documents to one XML document at the same time. No need to use
> <Include> for this; just call the “XRulesDocuments.Add()” method
> multiple times; once for each XRules document you want to attach.
>
> dxml.XRulesDocuments.Add(xrulesDoc1);
>
> dxml.XRulesDocuments.Add(xrulesDoc2);
>
> dxml.XRulesDocuments.Add(xrulesDoc3);
>
Implementing either an XInclude or a xrules specific include would be
more in following with what other XML languages implement, like XML
Schema and XSLT.
Dave
That’s
actually easy. DDOM Supports attaching multiple XRules documents to one XML
document at the same time. No need to use <Include> for this; just call the
“XRulesDocuments.Add()” method multiple times; once for each XRules
document you want to attach.
dxml.XRulesDocuments.Add(xrulesDoc1);
dxml.XRulesDocuments.Add(xrulesDoc2);
dxml.XRulesDocuments.Add(xrulesDoc3);
Regards,
Waleed
-----Original Message----- From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of radobject Sent: Tuesday, January 16, 2007
4:46 AM To: xrules@yahoogroups.com Subject: [xrules] Re: Include or
Import in XRule
How can simulate with
XRule or DDOM. I have 1 XML file and 3 Xrule
file that I want to run on XML file.
Best regards
Sasan Nikookar
--- In xrules@yahoogroups.com,
"Waleed K. Abdulla"
<waleed_abdulla@...> wrote:
>
> Sasan,
>
> The current implementation does not support the <include> or
<import>
> elements yet.
>
>
>
> Regards,
>
> Waleed
>
>
>
>
>
> -----Original Message-----
> From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com]
On
Behalf Of
> radobject
> Sent: Monday, January 15, 2007 11:14 PM
> To: xrules@yahoogroups.com
> Subject: [xrules] Include or Import in XRule
>
>
>
> Hi
>
> I want to kno XRULE suppot import or include statement for adding
> another XRule into a XRule file.
>
> Best regards
> Sasan Nikookar
>
How can simulate with XRule or DDOM. I have 1 XML file and 3 Xrule
file that I want to run on XML file.
Best regards
Sasan Nikookar
--- In xrules@yahoogroups.com, "Waleed K. Abdulla"
<waleed_abdulla@...> wrote:
>
> Sasan,
>
> The current implementation does not support the <include> or
<import>
> elements yet.
>
>
>
> Regards,
>
> Waleed
>
>
>
>
>
> -----Original Message-----
> From: xrules@yahoogroups.com [mailto:xrules@yahoogroups.com] On
Behalf Of
> radobject
> Sent: Monday, January 15, 2007 11:14 PM
> To: xrules@yahoogroups.com
> Subject: [xrules] Include or Import in XRule
>
>
>
> Hi
>
> I want to kno XRULE suppot import or include statement for adding
> another XRule into a XRule file.
>
> Best regards
> Sasan Nikookar
>
The current
implementation does not support the <include> or <import> elements yet.
Regards,
Waleed
-----Original Message----- From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of radobject Sent: Monday, January 15, 2007
11:14 PM To: xrules@yahoogroups.com Subject: [xrules] Include or
Import in XRule
Hi
I want to kno XRULE suppot import or include statement for adding
another XRule into a XRule file.
Hi all,
I have this XML :
...
<PartList>
<part>
<Name>AAAABBBBCCCC100</Part>
<Format>############999</Format>
<Size>15</Size>
</Part>
</partList>
...
I want to write XSD file and XRule file for it that support
attribute,type,ref and ... for it. (I need both of them)
I know this group only for XRule but I want to know XSD and XRULE
format for this XML :).
Best regards
Sasan
-----Original Message-----
From: radobject [mailto:radobject@...]
Sent: Saturday, January 13, 2007 2:18 PM
To: xrules@yahoogroups.com
Subject: Need help about XMLAttribute
Hi,
Thank you about XRule,It is so usefull Rule Management.
I have problem with XmlAttribute like this:
<FLN ID="F051601004"
SUM="">
<CFLN ID="1">10</CFLN>
<CFLN ID="2">2</CFLN>
<CFLN ID="3">4</CFLN>
</FLN>
I want to calculate sum of CFLN and set it into SUM attribute.
You can use the regex attribute of the <bind> rule to select a regular
expression to match your format. Here is an example I made up. You can find
excellent regular expression examples at http://regexlib.com/
<xr:rules xmlns:xr="http://www.xrules.org/2003/11">
<xr:ruleset context="/Contact">
<xr:bind target="Phone" regex="'^[+]?\d{1,3}-\d{2}-\d{1,7}$'" />
<xr:bind target="Email" regex="'\w+@\w+.(com|org|net)'" />
<xr:bind target="ZipCode" regex="'\d{3}-\d{3}-[A-Z]{3}-\d{3}[A-Z]'" />
</xr:ruleset>
</xr:rules>
Regards,
Waleed
-----Original Message-----
From: radobject [mailto:radobject@...]
Sent: Saturday, January 13, 2007 6:03 PM
To: xrules@yahoogroups.com
Subject: How can control data format with XRule?
Hi,
I have a question about How I can control email,phone,... format with
XRule.
<Contact>
<Phone>+98-21-2222222</phone>
<Email>Radobject@...</Email>
<ZipCode>123-456-ARC-555A</ZipCode>
</Contact>
Best regards
In the above rule, instead of checking
for the “Total” element, we look to see if there are child <CFLN>
elements which indicate that a total amount needs to be calculated. Then, we
let the <calculate> rule create the <Total> element by adding the createNode=”last”
attribute. It gets us the same result, but you don’t have to create the
<Total> element in your source document.
Regards,
Waleed
-----Original Message----- From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of radobject Sent: Saturday, January 13, 2007
4:26 PM To: xrules@yahoogroups.com Subject: [xrules] I found ... :)
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">ÂÓãÇä ÂÈی</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)
Hi,
Thank you about XRule,It is so usefull Rule Management.
I have problem with XmlAttribute like this:
<FLN ID="F051601004" SUM="">
<CFLN ID="1">10</CFLN>
<CFLN ID="2">2</CFLN>
<CFLN ID="3">4</CFLN>
</FLN>
I want to calculate sum of CFLN and set it into SUM attribute.
<?xml version="1.0" encoding="utf-16"?>
<xr:rules xmlns:xr="http://www.xrules.org/2003/11">
<xr:ruleset context="/FLN">
<xr:calculate target="SUM">
<xr:value>sum(CFLN)</xr:value>
</xr:calculate>
</xr:ruleset>
</xr:rules>
But when I use this XRule, I get error "Not found SUM,You can use
CreateNode Attribute ...."
How can I set <SUM> XMlAttribute in my XML file.
Hi,
I have this XML file :
...
<Part>
<ID>1</ID>
<FLN ID="F051601001">ÂÓãÇä ÂÈی</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></Total>
</FLN>
</Part>
<Part>
<ID>3</ID>
<FLN ID="F051601005">3400</FLN>
<FLN ID="F051601006">40</FLN>
<FLN ID="F051601007" >
<CFLN ID="1">10</CFLN>
<CFLN ID="2">2</CFLN>
<CFLN ID="3">4</CFLN>
<Total></Total>
</FLN>
</Part>
<Part>
<ID>4</ID>
<FLN ID="F051601008" >
<CFLN ID="1">10</CFLN>
<CFLN ID="2">2</CFLN>
<Total></Total>
</FLN>
</Part>
I want use XRule calculator for calculate sum of CFLN and set into
Total tag. I want to know how can use XRule for calculate sum with
loop not direct address. does XRule have a function for check an xml
element has a specific child like Total and if it has then calculate
it.
Where can I found XRule function like iif,position or ...?
Best regards
Hi,
I have a question about How I can control email,phone,... format with
XRule.
<Contact>
<Phone>+98-21-2222222</phone>
<Email>Radobject@...</Email>
<ZipCode>123-456-ARC-555A</ZipCode>
</Contact>
Best regards
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">ÂÓãÇä ÂÈی</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
I don’t believe that these warnings are an issue. Most of them are complaining
that types and interfaces under the Microsoft.Vsa namespace are obsolete. This
namespace provides functionality for compiling and running scripts (VBScript,
Javascript, …etc) at run time, which the DynamicDOM does NOT support right now.
However, you’re getting the warnings because the code that supports running
scripts in DynamicDOM does exist, but not used. Originally, I added the ability
to embed JavaScript functions inside XRules files using the <script> element to
do things that XPath doesn’t support. However, this feature is not well tested
yet, and therefore it’s disabled.
The other warnings are about using old classes for handling XML Schemas.
Again, this is not a problem (yet) because these classes still exist and work.
However, I think I should replace them before .NET 3.0 is out (just in case).
Regards,
Waleed
>
> From: "w1lls1d" <w1lls1d@...>
> Date: 2007/01/04 Thu AM 11:16:34 EST
> To: xrules@yahoogroups.com
> Subject: [xrules] Being deprecated in Visual Studio 2005
>
> To begin -- XRules is some very useful and cool stuff!
>
> I used TortoiseSVN to get the latest source from tigris.org and
> compiled (I use VS 2005 and was interested in getting the source
> formatted to that environment). Solution compiled without errors, but
> saw lots of warnings similar to -- 'Microsoft.whatever.whatever' is
> obsolete: 'Use of this type is not recommended because it is being
> deprecated in Visual Studio 2005...'
>
> Are there concerns with these?
>
>
>
To begin -- XRules is some very useful and cool stuff!
I used TortoiseSVN to get the latest source from tigris.org and
compiled (I use VS 2005 and was interested in getting the source
formatted to that environment). Solution compiled without errors, but
saw lots of warnings similar to -- 'Microsoft.whatever.whatever' is
obsolete: 'Use of this type is not recommended because it is being
deprecated in Visual Studio 2005...'
Are there concerns with these?
You
raise a good point. I just finished implementing a fix and uploaded it to the
repository at http://dynamicdom.tigris.org/ . I changed NodeTracker to be a
regular class (not static) and an instance of it is now kept in DXmlDocument. This
way, it should be safe to use different DXmlDocuments in different threads at
the same time.
Regards,
Waleed
P.S. Sorry for the late reply. I’m
still out on vacation.
-----Original Message----- From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of voxdog69 Sent:Friday,
December 08, 20063:26 PM To: xrules@yahoogroups.com Subject: [xrules] Multi-User /
Multi-Threaded Issue
It appears that the
NodeTracker is a static class with a static
ParticleList as its collection.
If you attempt to use DynamicDom in a webserver environment errors can
error (e.g., the NodeTracker.EndTracking will clear the collection
which may be holding another user's Particles.)
Do you plan on making updates to this anytime soon? Do you have a
suggested solution?
BTW: other than that, the project/code is very nice. Thanks.