That’s a fair requirement. It’s
probably very useful for many applications to be able to assign a severity
level to rules. There is no support built in right now for it, but I’ll
see if it’s an easy thing to add in the next few days.
If you’re using XSLT to format the
XML error report, then a possible hack is to prefix your error messages in the XRules document with “warning:” or “error:”
and then use XSLT to detect these strings and treat the errors differently. I
know it’s a dirty hack; so if you’re not in an urgent need for this
feature, I’d recommend waiting a little bit for a proper implementation.
Waleed
-----Original Message-----
From: xrules@yahoogroups.com
[mailto:xrules@yahoogroups.com] On Behalf Of mike61079
Sent:
To: xrules@yahoogroups.com
Subject: [xrules] Re: Dublin Core
and XHTML Annotations
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.
> 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.
>
> This approach provides a way to annotate documents using well
> defined and standardized elements such as those of Dublin Core
> (http://dublincore.
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-
>
> <xr:rules xmlns:xr="http://www.xrules.
> xmlns:dc="http://purl.
> xmlns:xhtml=
>
> <dc:title>Sample XRules Document</dc:
> <dc:creator>
> <dc:subject>
> Annotations.
> <dc:description>
XHTML
> annotations.
> <dc:date>2006-
> <dc:language>
> <dc:rights>Copyrigh
>
> <xhtml:div>
> <xhtml:h1>XRules Test Document</xhtml:
> <xhtml:p>This document demonstrates using XHTML
> and <xhtml:a href="http://dublincore.
> Core</xhtml:
> annotations.
> </xhtml:p>
> </xhtml:div>
>
> <xr:ruleset context="root"
> <dc:description>
> element.</dc:
>
> <xr:validate test="value > 2">
> <dc:description>
> rules.</dc:descript
> </xr:validate>
>
> <xr:calculate target="result" createNode="
> <dc:description>
> rules.</dc:descript
> <xr:value>value * 2</xr:value>
> </xr:calculate>
> <xr:bind target="result" max="10">
> <xhtml:p>Test annotation of bind rules.</xhtml:
> <xr:valueset values="config(
> <dc:description>
> rules.</dc:descript
> </xr:valueset>
> </xr:bind>
> </xr:ruleset>
>
> </xr:rules>
>
>
>
> Best Regards,
> Waleed
>