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