[RuleML-all] RuleML newbie question
David Dossot
david at dossot.net
Wed Aug 1 15:19:27 ADT 2007
Hi Roberto,
I think you got Var, Ind and label mixed. Here a version that, if the ink
level is equal to 30, report that ink level as being low.
<?xml version="1.0" encoding="utf-8"?>
<RuleML xmlns="http://www.ruleml.org/0.9/xsd" xsi:schemaLocation="
http://www.ruleml.org/0.9/xsd ruleml-0_9-nafdatalog.xsd" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<oid>
<Ind>Ink Control Knowledge Base</Ind>
</oid>
<Assert>
<!-- Implication: Ink is low level if Level is equal 30 -->
<Implies>
<head>
<Atom>
<Rel>LowLevel</Rel>
<Var>Ink</Var>
</Atom>
</head>
<body>
<Atom>
<Rel>Level</Rel>
<Var>Ink</Var>
<Ind>30</Ind>
</Atom>
</body>
</Implies>
<!-- RedInk is level 30 -->
<Atom>
<Rel>Level</Rel>
<Ind>RedInk</Ind>
<Ind>30</Ind>
</Atom>
</Assert>
<!-- Query: Find low level inks -->
<Query>
<oid>
<Ind>Low Level Ink</Ind>
</oid>
<Atom>
<Rel>LowLevel</Rel>
<Var>Ink</Var>
</Atom>
</Query>
</RuleML>
On 8/1/07, Colnaghi Junior, Roberto (R&D Brazil) <roberto.junior at hp.com>
wrote:
>
> Hi all,
>
> I'm still trying to figure out how to work with RuleML on NxBRE console
> app.
>
> I'm trying to build a simple Implication, feeding a single Fact and wish
> to query it back.
>
> After long hours of frustration I'm still not able to see the magic of
> it.
>
> Can someone help me find out if the ruleml.0.9 file is correct?
>
> Thanks in advance,
> Roberto
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <RuleML xmlns="http://www.ruleml.org/0.9/xsd"
> xsi:schemaLocation="http://www.ruleml.org/0.9/xsd
> ruleml-0_9-nafdatalog.xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <oid>
> <Ind>Ink Control Knowledge Base</Ind>
> </oid>
> <Assert>
> <!-- Implication: Ink is low level if Level is less or equals 30
> -->
> <Implies>
> <head>
> <Atom>
> <Rel>LowLevel</Rel>
> <Var>Ink</Var>
> </Atom>
> </head>
> <body>
> <Atom>
> <Rel>Level</Rel>
> <Var>Ink</Var>
> <Ind>30</Ind>
> </Atom>
> </body>
> </Implies>
> <!-- RedInk is level 30 -->
> <Atom>
> <oid>
> <Ind>Level</Ind>
> </oid>
> <Rel>RedInk</Rel>
> <Ind>30</Ind>
> </Atom>
> </Assert>
> <!-- Query: Find low level inks -->
> <Query>
> <oid>
> <Ind>Low Level Ink</Ind>
> </oid>
> <Atom>
> <Rel>LowLevel</Rel>
> <Var>Level</Var>
> <Var>Ink</Var>
> </Atom>
> </Query>
> </RuleML>
> _______________________________________________
> RuleML-all mailing list
> RuleML-all at ruleml.org
> http://mail.ruleml.org/mailman/listinfo/ruleml-all
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ruleml.org/pipermail/ruleml-all/attachments/20070801/2c0712f7/attachment.htm
More information about the RuleML-all
mailing list