opengeospatial / ets-wms13

Repository for the Exectutable Test Suite for WMS 1.3.0
Apache License 2.0
2 stars 4 forks source link

values of "false"/"true" are not accepted for boolean attributes #26

Closed pomakis closed 8 years ago

pomakis commented 8 years ago

The WMS 1.3.0 CITE test suite only allows the boolean attributes of the element to have the values "0" and "1". However, the more canonical forms of "false" and "true" are allowed by both the specification and the schema.

The following tests fail if a WMS 1.3.0 capabilities document legitimately returns "false"/"true" values for these attributes: main:std-data-queryable basic_elements:extra-GetFeatureInfo-param getfeatureinfo:main

I believe this bug arose because the WMS 1.3.0 test suite evolved from the WMS 1.1.1 test suite, and in WMS 1.1.1 only "0" and "1" are legal values.

bermud commented 8 years ago

@pomakis, thank you for submitting the issue/question. We should respond by the next week.

dstenger commented 8 years ago

Thank you for reporting. The function "functions:boolean-as-integer" should already convert a "true"/"false" to "0"/"1". This function is used in all referenced tests. Can you please provide a test server? Then, further analysis can be done why the tests are failing.

pomakis commented 8 years ago

You wrote:

Thank you for reporting. The function "functions:boolean-as-integer" should already convert a "true"/"false" to "0"/"1". This function is used in all referenced tests. Can you please provide a test server? Then, further analysis can be done why the tests are failing.

The following WMS 1.3.0 service:

http://demo.cubewerx.com/cubewerx/cubeserv/cite_wms130?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0

fails the following tests:

main:std-data-queryable basic_elements:extra-GetFeatureInfo-param getfeatureinfo:main

for this reason. For example, the main:std-data-queryable test fails with the following message:

Test main:std-data-queryable type Mandatory default result Passed (s0009/d711e364_1/d711e456_1)

Assertion: The CITE standard dataset layers containing polygons are queryable.

Context: Label: Value: Capabilities XML

Error in call to extension function {public synchronized void com.occamlab.te.TECore.callTest(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo,java.lang.String) throws java.lang.Exception}: Exception in extension function java.lang.RuntimeException: net.sf.saxon.s9api.SaxonApiException: Cannot convert string "true" to a double Result: Failed

Keith Pomakis pomakis@pobox.com http://www.pomakis.com/

dstenger commented 8 years ago

There is a bug in function "functions:boolean-as-integer". Following line leads to the error:

<xsl:when test="$boolean-or-int = 1">1</xsl:when>

Here, a string is compared to a double. This can be resolved by converting all values to strings (on code-side).

dstenger commented 8 years ago

We created a fix which is provided by pull request #30.

The fix will be included in the next release.

dstenger commented 8 years ago

Pull request #30 was merged into master branch (after having done tests). Fix will be part of the upcoming release.