This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Paul, thank you so much for reporting this. Actually, it you can fix it in your server quite easily if you don't mind editing jsp a little bit. If you are able to locate the jsp files that generate that xml that are in the : $TOMCAT_HOME/webapps/thredds/WEB-INF/jsp/wms directory. Just adding: trimDirectiveWhitespaces="true" into the page tag should remove all the undesired white lines. You need to do it in the files: xml_header.jsp and capabilities_xml_1_1_1.jsp. So, the first line in the xml_header.jsp is: <%@page contentType="text/xml"%><%@page pageEncoding="UTF-8"%><?xml version="1.0" encoding="UTF-8"?> and should look something like: <%@page contentType="text/xml" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%><?xml version="1.0" encoding="UTF-8"?> Then, in the capabilities_xml_1_1_1.jsp file it's (also the first line): <%@page contentType="application/vnd.ogc.wms_xml"%><%@page pageEncoding="UTF-8"%><?xml version="1.0" encoding="UTF-8" standalone="no"?> and should be : <%@page contentType="text/xml" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%><?xml version="1.0" encoding="UTF-8" standalone="no"?> And that's it. Of course we will add that in our next TDS release but that should work for you if you don't want to wait until then. Cheers! Marcos Hermida. Ticket Details =================== Ticket ID: IEU-827463 Department: Support THREDDS Priority: Normal Status: Open