Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Contact person and organisation are mandatory in wms capabilities schema
  • Loading branch information
mhugent committed Jul 19, 2011
1 parent 707ab4e commit 071f7e1
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/mapserver/qgsprojectparser.cpp
Expand Up @@ -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() )
Expand Down

0 comments on commit 071f7e1

Please sign in to comment.