My favorites | Sign in
Project Logo
xdv
             
People details
Project owners:
  tkokoszka

Summary

XML Document Validator is a Java based implementation of CLiXML - Constraint Language in XML. It allows to express complex constraints about XML content using a mixture of first order logic and XPath.

CLiXML is much more powerful that XML-Schema or RelaxNG and simpler to understand and use than Schematron.

Visit Project Home Site for more information - http://sites.google.com/site/xmlxdv

Key features

More information

Example

XML document to validate:

<?xml version="1.0"?>
<device>
  <actions>
    <action name="execute"/>
  </actions>
  <events>
    <event trigger="onFirstCall" actionNameRef="execute"/>
    <event trigger="onCall" actionNameRef="execute"/>
  </events>
</device>

A sample rule expressed in CLiXML:

<?xml version="1.0"?>
<rules xmlns="http://www.clixml.org/clix/1.0">
  <rule id="R1">
    <header>
      <author>Tomasz Kokoszka</author>
      <description>
        Action cannot be orphan - there has to be at least one event referring to it.
      </description>
    </header>
    <report>Orphan action</report>
    <forall var="actionName" in="/device/actions/action/@name">
      <exists var="e" in="/device/events/event[@actionNameRef=$actionName]"/>
    </forall>
  </rule>
</rules>








Hosted by Google Code