Wow this is great I like the documentation. I was just asking you
about this! Great timing.
I had a thought I'd like to share. I think it would be helpful to be
able to specify a category for a rule error. Sometimes I would like
to classify an error as "info" or "warning" instead of just error. I
could build up a really good report of information this way. Any
thoughts? Maybe there is a way to achieve this now.
--- In xrules@yahoogroups.com, "Waleed K. Abdulla" <waleed_abdulla@...
> wrote:
>
> Hi everyone,
> I just completed updating the DDOM to accept Dublin Core and
XHTML
> annotations in XRules documents. In fact, you can use any type of
> annotations you like; the DDOM will simply ignore all XML elements
that
> don't belong to the XRules namespace. You can find the latest
update at
> http://dynamicdom.tigris.org/
>
> This approach provides a way to annotate documents using well
> defined and standardized elements such as those of Dublin Core
> (http://dublincore.org/) rather than creating proprietary
annotations
> specific to XRules. I read about this first when I learned that
RelaxNG
> uses it, and it seems like a powerful and yet simple solution.
>
> Here is a sample XRules document that uses both DC and XHTML
> annotations at different levels in its hierarchy.
>
>
> <?xml version="1.0" encoding="utf-8" ?>
>
> <xr:rules xmlns:xr="http://www.xrules.org/2003/11"
> xmlns:dc="http://purl.org/dc/elements/1.1/"
> xmlns:xhtml="http://www.w3.org/1999/xhtml">
>
> <dc:title>Sample XRules Document</dc:title>
> <dc:creator>Waleed K. Abdulla</dc:creator>
> <dc:subject>Test using Dublin Core and XHTML
> Annotations.</dc:subject>
> <dc:description>This document demonstrates Dublin Core and
XHTML
> annotations.</dc:description>
> <dc:date>2006-06-04</dc:date>
> <dc:language>en</dc:language>
> <dc:rights>Copyright Waleed K. Abdulla.</dc:rights>
>
> <xhtml:div>
> <xhtml:h1>XRules Test Document</xhtml:h1>
> <xhtml:p>This document demonstrates using XHTML
> and <xhtml:a href="http://dublincore.org/">Dublin
> Core</xhtml:a>
> annotations.
> </xhtml:p>
> </xhtml:div>
>
> <xr:ruleset context="root">
> <dc:description>This ruleset applies to the root
> element.</dc:description>
>
> <xr:validate test="value > 2">
> <dc:description>Test annotation of validate
> rules.</dc:description>
> </xr:validate>
>
> <xr:calculate target="result" createNode="first">
> <dc:description>Test annotation of calculate
> rules.</dc:description>
> <xr:value>value * 2</xr:value>
> </xr:calculate>
> <xr:bind target="result" max="10">
> <xhtml:p>Test annotation of bind rules.</xhtml:p>
> <xr:valueset values="config('numbers')/value">
> <dc:description>Test annotation of valueset
> rules.</dc:description>
> </xr:valueset>
> </xr:bind>
> </xr:ruleset>
>
> </xr:rules>
>
>
>
> Best Regards,
> Waleed
>