From 11109d43612d924f80f74d0a4a847c7a102c6606 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 31 Jan 2019 16:00:20 -0500 Subject: core: Add _where-*_ query predicate templates These provide a more pleasent abstraction than having to reference CMP_OP_* constants. * core/test/core/vector/interpolate.xml: {t:when=>t:where-eq}. * core/test/core/vector/table.xml: Likewise, but using the other variants where appropriate given the value of `@op'. * core/vector/interpolate.xml: Likewise. * core/vector/table.xml (_when_, _where_): Rename former to latter and provide deprecation warning. (_when-lt_, _when-lte_, _when-gt_, _when-gte_): Add abstractions. * src/current/rater.xsd: Permit template variable as tenplate name. --- core/test/core/vector/interpolate.xml | 12 +++--- core/test/core/vector/table.xml | 52 +++++++++++------------ core/vector/interpolate.xml | 4 +- core/vector/table.xml | 80 ++++++++++++++++++++++++++++++++++- 4 files changed, 113 insertions(+), 35 deletions(-) (limited to 'core') diff --git a/core/test/core/vector/interpolate.xml b/core/test/core/vector/interpolate.xml index 91b5b2e..edf3407 100644 --- a/core/test/core/vector/interpolate.xml +++ b/core/test/core/vector/interpolate.xml @@ -130,9 +130,9 @@ - + - + @@ -170,10 +170,10 @@ key="key" step="INTERP_TABLE_STEP" actual="#300"> - + - + @@ -220,10 +220,10 @@ key="key" step="INTERP_TABLE_STEP" actual="#350"> - + - + diff --git a/core/test/core/vector/table.xml b/core/test/core/vector/table.xml index df2b5e3..1491e11 100644 --- a/core/test/core/vector/table.xml +++ b/core/test/core/vector/table.xml @@ -122,9 +122,9 @@ - + - + @@ -137,12 +137,12 @@ - + - - + + - + @@ -160,9 +160,9 @@ - + - + @@ -177,12 +177,12 @@ - + - - + + - + @@ -218,9 +218,9 @@ - + - + @@ -244,9 +244,9 @@ - + - + @@ -270,9 +270,9 @@ - + - + @@ -296,9 +296,9 @@ - + - + @@ -323,9 +323,9 @@ - + - + @@ -343,12 +343,12 @@ - + - - + + - + diff --git a/core/vector/interpolate.xml b/core/vector/interpolate.xml index f8887ba..a2725f1 100644 --- a/core/vector/interpolate.xml +++ b/core/vector/interpolate.xml @@ -202,10 +202,10 @@ - + - + diff --git a/core/vector/table.xml b/core/vector/table.xml index 53c13a7..515f638 100644 --- a/core/vector/table.xml +++ b/core/vector/table.xml @@ -348,7 +348,45 @@ -