I think that's a bug in the parser - WMS 1.1.1 uses a DTD to define the XML
<!DOCTYPE WMT_MS_Capabilities SYSTEM " http://localhost:8080/geoserver-2.18.1/schemas/wms/1.1.1/WMS_MS_Capabilities.dtd "> and that includes <!ATTLIST OnlineResource xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink" xlink:type CDATA #FIXED "simple" xlink:href CDATA #REQUIRED > So there is no need for the xlink namespace to be declared (in fact it would be invalid to declare a namespace and a DTD in the same document). If you are working with a parser that is unable to handle DTDs then it is probably worth switching to WMS version 1.3 which is fully schema defined. <WMS_Capabilities xmlns="http://www.opengis.net/wms" xmlns:xlink=" http://www.w3.org/1999/xlink" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" version="1.3.0" updateSequence=" 162" xsi:schemaLocation="http://www.opengis.net/wms http://localhost:8080/geoserver-2.18.1/schemas/wms/1.3.0/capabilities_1_3_0.xsd "> Ian On Wed, 20 Jan 2021 at 11:16, COOK, JOHN <[email protected]> wrote: > Dear All, > > > > We have an instance of GeoServer v 2.17.1 installed. > > > > The GetCapabilities xml generated by > http://<<server>>/geoserver/gwc/service/wms?TILED=TRUE&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1 > appears to be invalid. > > > > Where a style has been applied to a raster layer, the Style tag contains a > LegendURL tag that contains an OnlineResource tag. This OnlineResource tag > appears to be causing the following XML parsing error: “Namespace prefix > xlink from href on OnlineResource is not defined”. > > > > <TileSet> > > <SRS>EPSG:900913</SRS> > > … > > <Layers>OS:VectorMap</Layers> > > <Styles> > > <Style> > > <Name>VectorMap_GREY</Name> > > <LegendURL width="20" height="20"> > > <Format>image/png</Format> > > <OnlineResource xlink:type="simple" xlink:href="http:// > <<server>>/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=OS%3AVectorMap&style=VectorMap_GREY"/> > > </LegendURL> > > </Style> > > </Styles> > > </TileSet> > > > > Therefore, OpenLayers and other JavaScript xml parsers fail to parse the > GetCapabilties. > > > > Is there anything I can do that will add the “xmlns:xlink” attribute to > these OnlineResource tags? Any ideas will be gratefully received! > > > > > > All the best, > > > > John > > > > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to > this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Ian Turton
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
