From b62ed538c7216b5d8a0cf58803d8e52ae5ec20be Mon Sep 17 00:00:00 2001 From: David Carlisle Date: Tue, 3 Oct 2017 10:39:11 +0100 Subject: [PATCH] fix the OMI regex to match the spec issue #5 --- lib/RelaxNG/openmath2.rnc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/RelaxNG/openmath2.rnc b/lib/RelaxNG/openmath2.rnc index 62a57d1..78064f6 100644 --- a/lib/RelaxNG/openmath2.rnc +++ b/lib/RelaxNG/openmath2.rnc @@ -1,4 +1,5 @@ # RELAX NG Schema for OpenMath 2 +# Revision 2: Corrected regex for OMI to match the documented standard and allow hex default namespace om = "http://www.openmath.org/OpenMath" @@ -41,7 +42,7 @@ OMV = element OMV { common.attributes, # integer OMI = element OMI { common.attributes, - xsd:string {pattern = "\s*(-\s?)?[0-9]+(\s[0-9]+)*\s*"}} + xsd:string {pattern = "\s*-?((\s*[0-9])+|x(\s*[0-9A-F])+)\s*"}} # byte array OMB = element OMB { common.attributes, xsd:base64Binary }