Opened 16 years ago

Closed 16 years ago

#70 closed defect (fixed)

output valid WMC documents

Reported by: tomkralidis Owned by: josegar
Priority: major Milestone: v2.4.0 RC2
Component: Web Map Viewer Version: v2.2.0 Final
Keywords: Cc:

Description

If I:

...the resulting WMC doc is invalid. Below is what would constitute a valid output (tested in XMLSpy 2008).

<?xml version="1.0" encoding="UTF-8"?>
<ViewContext version="1.1.0" id="7b728eaa-7b06-4d5a-af90-d062f0349dfd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd" xmlns="http://www.opengis.net/context">
	<General>
		<Window width="368" height="276"/>
		<BoundingBox SRS="EPSG:4326" minx="-126.0" miny="-65.25001" maxx="79.20001" maxy="88.65001"/>
		<Title>Intermap context 7b728eaa-7b06-4d5a-af90-d062f0349dfd</Title>
	</General>
	<LayerList>
		<Layer queryable="false" hidden="false">
			<Server service="OGC:WMS" version="1.1.1" title="FAO GeoNetwork Web Map Server">
				<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geonetwork/geoserver/wms?SERVICE=WMS&amp;"/>
			</Server>
			<Name>gn:world</Name>
			<Title>Blue Marble world image</Title>
			<Abstract>Blue Marble world image</Abstract>
		</Layer>
		<Layer queryable="true" hidden="false">
			<Server service="OGC:WMS" version="1.1.1" title="FAO GeoNetwork Web Map Server">
				<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geonetwork/geoserver/wms?SERVICE=WMS&amp;"/>
			</Server>
			<Name>gn:gboundaries</Name>
			<Title>Country boundaries</Title>
			<Abstract>Derived from GAUL Country Boundaries</Abstract>
		</Layer>
		<Layer queryable="true" hidden="false">
			<Server service="OGC:WMS" version="1.1.1" title="FAO GeoNetwork OGC Web Map Server">
				<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://geonetwork3.fao.org/ows/14080?"/>
			</Server>
			<Name>currently_cereals_high_level_inputs</Name>
			<Title>Suitability of currently available land for rainfed production of cereals - high level of inputs</Title>
			<Abstract/>
		</Layer>
	</LayerList>
</ViewContext>

Note that the main changes are:

  • root element schema addition
  • ViewContext/General re-ordering of elements (Window, then BoundingBox, then Title)
  • ViewContext/LayerList/Layer re-ordering of elements (Server is always first)

Change History (3)

comment:1 by josegar, 16 years ago

Owner: changed from geonetwork-devel@… to josegar

comment:2 by ticheler, 16 years ago

Milestone: v2.4.0 RC2

comment:3 by josegar, 16 years ago

Resolution: fixed
Status: newclosed

If no markers included the generated WMC validates, but if markers are included the Extension definition in context.xsd have to change to

<xs:any namespace="##any" processContents="lax"/>

actual is

<xs:any namespace="##any"/>

to validate correctly.

Note: See TracTickets for help on using tickets.