[om] Re: Restricting the OpenMath Schemas

David Carlisle davidc at nag.co.uk
Tue Dec 2 16:18:38 CET 2003


Bill,

Following on from your comments about restricting the Schema,
I have prepared this version of the omcd2.rnc
It uses xsd:date for dates, xsd:nonNegativeInteger for version numbers,
restricts CDStatus and Role as you suggested, and constrains
CDDefinition to have exactly one Name and one Description child.

This is committed into the CVS sources of the OM2 draft, so
further comments are welcome,

David




# *********************************************
# 
# Relax NG Schema for OpenMath CD
# 
# *********************************************

default namespace = "http://www.openmath.org/OpenMathCD"

include "openmath2.rnc" {start = CD}

CDComment = element CDComment { text }
CDName = element CDName { xsd:NCName }
CDUses = element CDUses { CDName* }
CDURL = element CDURL { text }
CDBASE = element CDBASE { text }
text-or-om = (text | OMOBJ)*
CDReviewDate = element CDReviewDate { xsd:date }
CDDate = element CDDate { xsd:date }
CDVersion = element CDVersion { xsd:nonNegativeInteger }
CDRevision = element CDRevision { xsd:nonNegativeInteger }
CDStatus = element CDStatus { "official" | "experimental" | "private" | "obsolete"}
Description = element Description { text }
Name = element Name { xsd:NCName }
Role = element Role { "binder" | "semantic-attribution" | "error" | "default" }
CMP = element CMP { text }
FMP = element FMP { OMOBJ }
# allow embedded OM
Example = element Example { text-or-om }
CDDefinition =
  element CDDefinition {
    CDComment*,
    (Name & Description),
   (CDComment | Example | FMP | CMP)*
  }
CD =
  element CD {
    CDComment*,
    (CDName & CDURL & 
     CDReviewDate & CDDate & CDStatus & 
     CDUses & 
     CDVersion & CDRevision),
    (CDComment | Description | CDDefinition | Example)*
  }



-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--
om at openmath.org  -  general discussion on OpenMath
Post public announcements to om-announce at openmath.org
Automatic list maintenance software at majordomo at openmath.org
Mail om-owner at openmath.org for assistance with any problems



More information about the Om mailing list