gpt4 book ai didi

c# - XML架构

转载 作者:数据小太阳 更新时间:2023-10-29 01:53:54 24 4
gpt4 key购买 nike

对于我的应用程序,我必须使用未定义数量的不同检测策略。策略定义如下:

alt text

与门也可以是或门。现在,我在我的代码中硬编码了所有这些规则。为了更好的可扩展性,我想在一个 XML 文件中分别定义所有检测策略并解析它。但我不太确定如何在 XML 文件中定义这样的检测策略。任何提示如何开始?

最佳答案

看RuleML http://ruleml.org/

RuleML (Rule Markup Language) is a unifying family of XML-serialized rule languages spanning across all industrially relevant kinds of Web rules. It accommodates and extends other recent rule languages, building interoperation bridges between them. The Specification of RuleML is currently being developed from Version 0.91 to Version 1.0.

还有

The goal of the Rule Markup Initiative is to develop RuleML as the canonical Web language for rules using XML markup, formal semantics, and efficient implementations.

RuleML covers the entire rule spectrum, from derivation rules to transformation rules to reaction rules. RuleML can thus specify queries and inferences in Web ontologies, mappings between Web ontologies, and dynamic Web behaviors of workflows, services, and agents.

这应该可以避免您重新发明轮子。此外,XML 只是其中的一部分,如果您自己推出,则还必须构建工具包。

编辑:另请参阅 Drools(特定于 Java)http://www.jboss.org/drools

关于c# - XML架构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4569575/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com