ogc-schemas
ogc-schemas copied to clipboard
OnlineResource attributes are missing xlink-namespace
Hi,
The atttributes of net.opengis.wms.v_1_1_0.OnlineResource and net.opengis.wms.v_1_1_1.OnlineResource (xmlnsXlink, xlinkType, xlinkHref) are missing the namespace-parameter in @XmlAttribute. At the moment it looks e.g. like this:
@XmlAttribute(name = "xlink:href", required = true)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String xlinkHref;
but it needs to be something like this:
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink", required = true)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String xlinkHref;
Best regards, Gerd
I see the issue. Comes from the fact that WMS 1.1.1 is DTD, not XML Schema. So there actually are no namespaces, just attributes xlink:href and xlink:type. The problem is, however that the attribute xmlns:xlink is missing.
http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd
It looks like this may have been fixed in the dtd now.
It now contains this section:
<!-- An OnlineResource is typically an HTTP URL. The URL is placed in the
xlink:href attribute. The xmlns:xlink attribute is a required XML namespace
declaration. -->
<!ELEMENT OnlineResource EMPTY>
<!ATTLIST OnlineResource
xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"
xlink:type CDATA #FIXED "simple"
xlink:href CDATA #REQUIRED >