From 1206b71fb646eb11697575d5f5d25c6da40c4f10 Mon Sep 17 00:00:00 2001 From: rakhimov Date: Sun, 26 Feb 2017 22:09:38 -0800 Subject: [PATCH] Make report curve units more flexible/optional Decouple X and Y unit requirements for the curve schema. This allows mixing values with and without units. An example case is probability (unitless) vs. time (hours). With the coupled schema, both X and Y must or must not have units. The above example would fail to validate. --- mef/schema/curves.rnc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mef/schema/curves.rnc b/mef/schema/curves.rnc index 4b93ecb..3b032df 100644 --- a/mef/schema/curves.rnc +++ b/mef/schema/curves.rnc @@ -5,9 +5,9 @@ curve = (attribute X-title { xsd:string }, attribute Y-title { xsd:string }, attribute Z-title { xsd:string }?)?, - (attribute X-unit { unit }, - attribute Y-unit { unit }, - attribute Z-unit { unit }?)?, + attribute X-unit { unit }?, + attribute Y-unit { unit }?, + attribute Z-unit { unit }?, element point { attribute X { xsd:double }, attribute Y { xsd:double }, @@ -15,4 +15,4 @@ curve = }* } -unit = "seconds" | "hours" +unit = "seconds" | "hours" | "seconds-1" | "hours-1" | "years" | "years-1"