namespace dc = "http://purl.org/dc/elements/1.1/"
namespace h = "http://www.w3.org/1999/xhtml"
dc:title [
  "cmltypes: non FPX and XSD types for CML"
]
dc:description [ 
  "RELAX NG schema for lexical representations of floating point numbers. Ultimately this is essentially a datatypeLibrary for use in RelaxNG, although not yet implemented as such."
]
dc:author [ "Peter Murray-Rust" ]
dc:author [ "J A Townsend" ]
dc:rights [ "© Copyright J A Townsend <jat45@cantab.net> 2008." ]
dc:date ["20081905"]

# FIRST DEFINE SIMPLE TYPES

refType = xsd:token { pattern='([A-Za-z_][A-Za-z0-9_\-]*:)?[A-Za-z_][A-Za-z0-9_\-]*' }

chiralityType = xsd:token { pattern='enantiomer|racemate|unknown|other' }

elementTypeType = xsd:token { pattern='Ac|Al|Ag|Am|Ar|As|At|Au|B|Ba|Bh|Bi|Be|Bk|Br|C|Ca|Cd|Ce|Cf|Cl|Cm|Co|Cr|Cs|Cu|Db|Dy|Er|Es|Eu|F|Fe|Fm|Fr|Ga|Gd|Ge|H|He|Hf|Hg|Ho|Hs|I|In|Ir|K|Kr|La|Li|Lr|Lu|Md|Mg|Mn|Mo|Mt|N|Na|Nb|Nd|Ne|Ni|No|Np|O|Os|P|Pa|Pb|Pd|Pm|Po|Pr|Pt|Pu|Ra|Rb|Re|Rf|Rh|Rn|Ru|S|Sb|Sc|Se|Sg|Si|Sm|Sn|Sr|Ta|Tb|Tc|Te|Th|Ti|Tl|Tm|U|Uun|Uuu|Uub|Uut|Uuq|Uup|Uuh|Uus|Uuo|V|W|Xe|Y|Yb|Zn|Zr|Du|R'}


# #A concise representation for a molecular formula.
## This MUST adhere to a whitespaced syntax so that it is trivially 
## machine-parsable. Each element is followed by its count (which may be decimal), 
## and the string is optionally ended by a formal charge (of form d or -d, i.e. no '+')
## NO brackets or other nesting is allowed.            
formulaType = xsd:string { pattern='\s*([A-Z][a-z]?\s+(([0-9]+(\.[0-9]*)?)|(\.[0-9]*))?\s*)+(\s+[\-|+]?[0-9]+)?\s*' } 
	
#dc:description [
#            h:div [ "Bond order." ]
#            h:p [ 	"This is purely conventional and used
#       			for bond/electron counting. There is no default value. 
#         		The emptyString attribute can be used to indicate a bond of 
#         		unknown or unspecified type. The interpretation of this is outside
#         		the scope of CML-based algorithms. It may be accompanied by a " 
#         		h:tt [ "convention" ]
#         		" attribute on the " 
#         		h:tt [ "bond" ] 
#         		" which links to a dictionary."
#                ]
#               ]
#               ]
orderType = xsd:token { pattern='hbond|S|D|T|A|U|P' }

   
# NOW DEFINE LISTS OF SIMPLE TYPES


