tudelft3d / CityGML-schema-validation

small script to validate a CityGML file against the XSD schemas of CityGML (all versions supported)
MIT License
11 stars 3 forks source link

Wrong error message on CityGML version mismatch #2

Closed balazsdukai closed 6 years ago

balazsdukai commented 6 years ago

On webpage Validating the attached file gives the error Element '{http://www.opengis.net/citygml/building/1.0}Building': This element is not expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, {http://www.opengis.net/gml}FeatureCollection, {http://www.opengis.net/gml}MultiPointCoverage, {http://www.opengis.net/gml}MultiCurveCoverage, {http://www.opengis.net/gml}MultiSurfaceCoverage, {http://www.opengis.net/gml}MultiSolidCoverage, {http://www.opengis.net/gml}GridCoverage, {http://www.opengis.net/gml}RectifiedGridCoverage, {http://www.opengis.net/gml}Observation, {http://www.opengis.net/gml}DirectedObservation )., line 6

The problem with the file is that xmlns:bldg="http://www.opengis.net/citygml/building/1.0" should be xmlns:bldg="http://www.opengis.net/citygml/building/2.0". Therefore the error message should comply, probably sth along the lines of Expected is one of (http://www.opengis.net/citygml/building/2.0)

invalid_citygml_3.gml.zip

hugoledoux commented 6 years ago

this is just what the XML/XSD validator sends back... I am just showing you what it says!

one should probably use Xerces, but I can't be bothered. I've moved on to CityJSON anyway :)