Add ci test: validate against RNG schema
Change-Id: Ic13374c57db47b15480cc3c1ff82301bae573fa8
diff --git a/schemas/csl-choose.rnc b/schemas/csl-choose.rnc
new file mode 100644
index 0000000..f9310b2
--- /dev/null
+++ b/schemas/csl-choose.rnc
@@ -0,0 +1,76 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+namespace cs = "http://purl.org/net/xbiblio/csl"
+
+
+## cs:choose - Conditional Statements"
+div {
+ rendering-element.choose =
+
+ ## Use to conditionally render rendering elements.
+ element cs:choose { choose.if, choose.else-if*, choose.else? }
+ choose.if = element cs:if { condition+, match, rendering-element* }
+ choose.else-if =
+ element cs:else-if { condition+, match, rendering-element* }
+ choose.else = element cs:else { rendering-element+ }
+ condition =
+
+ ## If used, the element content is only rendered if it disambiguates two
+ ## otherwise identical citations. This attempt at disambiguation is only
+ ## made after all other disambiguation methods have failed.
+ [ a:defaultValue = "true" ] attribute disambiguate { "true" }
+ |
+ ## Tests whether the given variables contain numeric text.
+ attribute is-numeric {
+ list { variables+ }
+ }
+ |
+ ## Tests whether the given date variables contain approximate dates.
+ attribute is-uncertain-date {
+ list { variables.dates+ }
+ }
+ |
+ ## Tests whether the locator matches the given locator types.
+ attribute locator {
+ list { terms.locator+ }
+ }
+ |
+ ## Tests whether the cite position matches the given positions.
+ attribute position {
+ list {
+ ("first"
+ | "subsequent"
+ | "ibid"
+ | "ibid-with-locator"
+ | "near-note")+
+ }
+ }
+ |
+ ## Tests whether the item matches the given types.
+ attribute type {
+ list { item-types+ }
+ }
+ |
+ ## Tests whether the default ("long") forms of the given variables
+ ## contain non-empty values.
+ attribute variable {
+ list { variables+ }
+ }
+ match =
+
+ ## Set the testing logic.
+ [ a:defaultValue = "all" ]
+ attribute match {
+
+ ## Element only tests "true" when all conditions test "true" for all
+ ## given test values.
+ "all"
+ |
+ ## Element tests "true" when any condition tests "true" for any given
+ ## test value.
+ "any"
+ |
+ ## Element only tests "true" when none of the conditions test "true"
+ ## for any given test value.
+ "none"
+ }?
+}