Skip to content
Permalink
Browse files

Contact person and organisation are mandatory in wms capabilities schema

  • Loading branch information
mhugent committed Jul 19, 2011
1 parent 707ab4e commit 071f7e16359b46177d9a2cd407a5ce9862ac2b4e
Showing with 15 additions and 15 deletions.
  1. +15 −15 src/mapserver/qgsprojectparser.cpp
@@ -1304,30 +1304,30 @@ void QgsProjectParser::serviceCapabilities( QDomElement& parentElement, QDomDocu

//Contact person
QDomElement contactPersonElem = propertiesElem.firstChildElement( "WMSContactPerson" );
QString contactPersonString;
if ( !contactPersonElem.isNull() )
{
QDomElement wmsContactPersonElem = doc.createElement( "ContactPerson" );
QDomText contactPersonText = doc.createTextNode( contactPersonElem.text() );
wmsContactPersonElem.appendChild( contactPersonText );
contactPersonPrimaryElem.appendChild( wmsContactPersonElem );
contactPersonString = contactPersonElem.text();
}
QDomElement wmsContactPersonElem = doc.createElement( "ContactPerson" );
QDomText contactPersonText = doc.createTextNode( contactPersonString );
wmsContactPersonElem.appendChild( contactPersonText );
contactPersonPrimaryElem.appendChild( wmsContactPersonElem );


//Contact organisation
QDomElement contactOrganisationElem = propertiesElem.firstChildElement( "WMSContactOrganisation" );
if ( !contactOrganisationElem.isNull() )
QDomElement contactOrganizationElem = propertiesElem.firstChildElement( "WMSContactOrganization" );
QString contactOrganizationString;
if ( !contactOrganizationElem.isNull() )
{
QDomElement wmsContactOrganisationElem = doc.createElement( "ContactOrganization" );
QDomText contactOrganisationText = doc.createTextNode( contactOrganisationElem.text() );
wmsContactOrganisationElem.appendChild( contactOrganisationText );
contactPersonPrimaryElem.appendChild( wmsContactOrganisationElem );
contactOrganizationString = contactOrganizationElem.text();
}

QDomElement wmsContactOrganizationElem = doc.createElement( "ContactOrganization" );
QDomText contactOrganizationText = doc.createTextNode( contactOrganizationString );
wmsContactOrganizationElem.appendChild( contactOrganizationText );
contactPersonPrimaryElem.appendChild( wmsContactOrganizationElem );
contactInfoElem.appendChild( contactPersonPrimaryElem );

//Contact address
//QDomElement contactAddressElem = doc.createElement( "ContactAddress" );
//contactInfoElem.appendChild( contactAddressElem );

//phone
QDomElement phoneElem = propertiesElem.firstChildElement( "WMSContactPhone" );
if ( !phoneElem.isNull() )

0 comments on commit 071f7e1

Please sign in to comment.
You can’t perform that action at this time.