xmlStandalone = false; $domDocument1->formatOutput = true; $domDocument2 = new DOMDocument('1.0', 'utf-8'); $domDocument2->xmlStandalone = false; $domDocument2->formatOutput = true; $getRecordsResponse1 = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:GetRecordsResponse'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xs', 'http://www.w3.org/2001/XMLSchema'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dct', 'http://purl.org/dc/terms/'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:ows', 'http://www.opengis.net/ows'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:gml', 'http://www.opengis.net/gml'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dif', 'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', 'http://www.w3.org/1999/xlink'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:gmd', 'http://www.isotc211.org/2005/gmd'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:ogc', 'http://www.opengis.net/ogc'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:fgdc', 'http://www.opengis.net/cat/csw/csdgm'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:csw', 'http://www.opengis.net/cat/csw/2.0.2'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:os', 'http://a9.com/-/spec/opensearch/1.1/'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:soapenv', 'http://www.w3.org/2003/05/soap-envelope'); $getRecordsResponse1->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:sitemap', 'http://www.sitemaps.org/schemas/sitemap/0.9'); $getRecordsResponseAttribute1 = $domDocument1->createAttribute('version'); $getRecordsResponseAttribute1->value = '2.0.2'; $getRecordsResponse1->appendChild($getRecordsResponseAttribute1); $getRecordsResponseAttribute1 = $domDocument1->createAttribute('xsi:schemaLocation'); $getRecordsResponseAttribute1->value = 'http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd'; $getRecordsResponse1->appendChild($getRecordsResponseAttribute1); $getRecordsResponse2 = $domDocument2->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:GetRecordsResponse'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xs', 'http://www.w3.org/2001/XMLSchema'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dct', 'http://purl.org/dc/terms/'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:ows', 'http://www.opengis.net/ows'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:gml', 'http://www.opengis.net/gml'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dif', 'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', 'http://www.w3.org/1999/xlink'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:gmd', 'http://www.isotc211.org/2005/gmd'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:ogc', 'http://www.opengis.net/ogc'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:fgdc', 'http://www.opengis.net/cat/csw/csdgm'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:csw', 'http://www.opengis.net/cat/csw/2.0.2'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:os', 'http://a9.com/-/spec/opensearch/1.1/'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:soapenv', 'http://www.w3.org/2003/05/soap-envelope'); $getRecordsResponse2->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:sitemap', 'http://www.sitemaps.org/schemas/sitemap/0.9'); $getRecordsResponseAttribute2 = $domDocument2->createAttribute('version'); $getRecordsResponseAttribute2->value = '2.0.2'; $getRecordsResponse2->appendChild($getRecordsResponseAttribute2); $getRecordsResponseAttribute2 = $domDocument2->createAttribute('xsi:schemaLocation'); $getRecordsResponseAttribute2->value = 'http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd'; $getRecordsResponse2->appendChild($getRecordsResponseAttribute2); # Search status 1 element. $searchStatus = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:SearchStatus'); $searchStatusAttribute = $domDocument1->createAttribute('timestamp'); $searchStatusAttribute->value = "2012-05-21T17:53:43Z"; $searchStatus->appendChild($searchStatusAttribute); $getRecordsResponse1->appendChild($searchStatus); # Search status 2 element. $searchStatus = $domDocument2->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:SearchStatus'); $searchStatusAttribute = $domDocument2->createAttribute('timestamp'); $searchStatusAttribute->value = "2012-05-21T17:53:43Z"; $searchStatus->appendChild($searchStatusAttribute); $getRecordsResponse2->appendChild($searchStatus); # $searchResults1 = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:SearchResults'); $searchResults2 = $domDocument2->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:SearchResults'); $searchResultsAttribute = $domDocument1->createAttribute('numberOfRecordsReturned'); $searchResultsAttribute->value = 10; $searchResults1->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument1->createAttribute('nextRecord'); $searchResultsAttribute->value = 11; $searchResults1->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument1->createAttribute('numberOfRecordsMatched'); $searchResultsAttribute->value = 12; $searchResults1->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument1->createAttribute('recordSchema'); $searchResultsAttribute->value = "http://www.opengis.net/cat/csw/2.0.2"; $searchResults1->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument1->createAttribute('elementSet'); $searchResultsAttribute->value = "full"; $searchResults1->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument2->createAttribute('numberOfRecordsReturned'); $searchResultsAttribute->value = 2; $searchResults2->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument2->createAttribute('nextRecord'); $searchResultsAttribute->value = 0; $searchResults2->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument2->createAttribute('numberOfRecordsMatched'); $searchResultsAttribute->value = 12; $searchResults2->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument2->createAttribute('recordSchema'); $searchResultsAttribute->value = "http://www.opengis.net/cat/csw/2.0.2"; $searchResults2->appendChild($searchResultsAttribute); $searchResultsAttribute = $domDocument2->createAttribute('elementSet'); $searchResultsAttribute->value = "full"; $searchResults2->appendChild($searchResultsAttribute); # record01 # # urn:uuid:88247b56-4cbc-4df9-9860-db3f8042e357 # http://purl.org/dc/dcmitype/Dataset # Physiography-Landforms # FI-ES # abstract1 # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:88247b56-4cbc-4df9-9860-db3f8042e357')); $record->appendChild($identifier); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Dataset')); $record->appendChild($type); # subject $subject = $domDocument1->createElement('dc:subject'); $subjectAttribute = $domDocument1->createAttribute('scheme'); $subjectAttribute->value = 'http://www.digest.org/2.1'; $subject->appendChild($subjectAttribute); $subject->appendChild($domDocument1->createTextNode('Physiography-Landforms')); $record->appendChild($subject); # spatial $spatial = $domDocument1->createElement('dct:spatial'); $spatial->appendChild($domDocument1->createTextNode('FI-ES')); $record->appendChild($spatial); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract1')); $record->appendChild($abstract); # Append record01 to the returned array. $records[] = $record; # Append record01 to the search results element. $searchResults1->appendChild($record); # record02 # # urn:uuid:1ef30a8b-876d-4828-9246-c37ab4510bbd # http://purl.org/dc/dcmitype/Service # abstract2 # # 60.042 13.754 # 68.410 17.920 # # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:1ef30a8b-876d-4828-9246-c37ab4510bbd')); $record->appendChild($identifier); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Service')); $record->appendChild($type); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract2')); $record->appendChild($abstract); # bounding box $boundingBox = $domDocument1->createElement('ows:BoundingBox'); $boundingBoxAttribute = $domDocument1->createAttribute('crs'); $boundingBoxAttribute->value = 'urn:x-ogc:def:crs:EPSG:6.11:4326'; $boundingBox->appendChild($boundingBoxAttribute); # lower corner $lowerCorner = $domDocument1->createElement('ows:LowerCorner'); $lowerCorner->appendChild($domDocument1->createTextNode('60.042 13.754')); $boundingBox->appendChild($lowerCorner); $record->appendChild($boundingBox); # upper corner $upperCorner = $domDocument1->createElement('ows:UpperCorner'); $upperCorner->appendChild($domDocument1->createTextNode('68.410 17.920')); $boundingBox->appendChild($upperCorner); $record->appendChild($boundingBox); # Append record02 to the returned array. $records[] = $record; # Append record02 to the search results element. $searchResults1->appendChild($record); # record03 # # urn:uuid:ab42a8c4-95e8-4630-bf79-33e59241605a # http://purl.org/dc/dcmitype/Service # Physiography # abstract3 # urn:uuid:88247b56-4cbc-4df9-9860-db3f8042e357 # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:ab42a8c4-95e8-4630-bf79-33e59241605a')); $record->appendChild($identifier); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Service')); $record->appendChild($type); # subject $subject = $domDocument1->createElement('dc:subject'); $subjectAttribute = $domDocument1->createAttribute('scheme'); $subjectAttribute->value = 'http://www.digest.org/2.1'; $subject->appendChild($subjectAttribute); $subject->appendChild($domDocument1->createTextNode('Physiography')); $record->appendChild($subject); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract3')); $record->appendChild($abstract); # relation $relation = $domDocument1->createElement('dc:relation'); $relation->appendChild($domDocument1->createTextNode('urn:uuid:88247b56-4cbc-4df9-9860-db3f8042e357')); $record->appendChild($relation); # Append record03 to the returned array. $records[] = $record; # Append record03 to the search results element. $searchResults1->appendChild($record); # record04 # # urn:uuid:784e2afd-a9fd-44a6-9a92-a3848371c8ec # title1 # http://purl.org/dc/dcmitype/Text # Hydrography--Dictionaries # application/pdf # 2006-05-12Z # abstract4 # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:784e2afd-a9fd-44a6-9a92-a3848371c8ec')); $record->appendChild($identifier); # title $title = $domDocument1->createElement('dc:title'); $title->appendChild($domDocument1->createTextNode('title1')); $record->appendChild($title); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Text')); $record->appendChild($type); # subject $subject = $domDocument1->createElement('dc:subject'); $subject->appendChild($domDocument1->createTextNode('Hydrography--Dictionaries')); $record->appendChild($subject); # format $format = $domDocument1->createElement('dc:format'); $format->appendChild($domDocument1->createTextNode('application/pdf')); $record->appendChild($format); # date $date = $domDocument1->createElement('dc:date'); $date->appendChild($domDocument1->createTextNode('2006-05-12Z')); $record->appendChild($date); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract4')); $record->appendChild($abstract); # Append record04 to the returned array. $records[] = $record; # Append record04 to the search results element. $searchResults1->appendChild($record); # record05 # # urn:uuid:e9330592-0932-474b-be34-c3a3bb67c7db # http://purl.org/dc/dcmitype/Text # title2 # 2003-05-09Z # Land titles # text/rtf # abstract5 # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:e9330592-0932-474b-be34-c3a3bb67c7db')); $record->appendChild($identifier); # title $title = $domDocument1->createElement('dc:title'); $title->appendChild($domDocument1->createTextNode('title2')); $record->appendChild($title); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Text')); $record->appendChild($type); # subject $subject = $domDocument1->createElement('dc:subject'); $subject->appendChild($domDocument1->createTextNode('Land titles')); $record->appendChild($subject); # format $format = $domDocument1->createElement('dc:format'); $format->appendChild($domDocument1->createTextNode('text/rtf')); $record->appendChild($format); # date $date = $domDocument1->createElement('dc:date'); $date->appendChild($domDocument1->createTextNode('2003-05-09Z')); $record->appendChild($date); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract5')); $record->appendChild($abstract); # Append record05 to the returned array. $records[] = $record; # Append record05 to the search results element. $searchResults1->appendChild($record); # record06 # # urn:uuid:19887a8a-f6b0-4a63-ae56-7fba0e17801f # http://purl.org/dc/dcmitype/Image # image/svg+xml # title3 # GR-22 # Tourism--Greece # abstract6 # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:19887a8a-f6b0-4a63-ae56-7fba0e17801f')); $record->appendChild($identifier); # title $title = $domDocument1->createElement('dc:title'); $title->appendChild($domDocument1->createTextNode('title3')); $record->appendChild($title); # spatial $spatial = $domDocument1->createElement('dct:spatial'); $spatial->appendChild($domDocument1->createTextNode('GR-22')); $record->appendChild($spatial); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Image')); $record->appendChild($type); # subject $subject = $domDocument1->createElement('dc:subject'); $subject->appendChild($domDocument1->createTextNode('Tourism--Greece')); $record->appendChild($subject); # format $format = $domDocument1->createElement('dc:format'); $format->appendChild($domDocument1->createTextNode('image/svg+xml')); $record->appendChild($format); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract6')); $record->appendChild($abstract); # Append record06 to the returned array. $records[] = $record; # Append record06 to the search results element. $searchResults1->appendChild($record); # record07 # # urn:uuid:a06af396-3105-442d-8b40-22b57a90d2f2 # http://purl.org/dc/dcmitype/Image # title4 # image/jpeg # IT-FI # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:a06af396-3105-442d-8b40-22b57a90d2f2')); $record->appendChild($identifier); # title $title = $domDocument1->createElement('dc:title'); $title->appendChild($domDocument1->createTextNode('title4')); $record->appendChild($title); # spatial $spatial = $domDocument1->createElement('dct:spatial'); $spatial->appendChild($domDocument1->createTextNode('IT-FI')); $record->appendChild($spatial); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Image')); $record->appendChild($type); # format $format = $domDocument1->createElement('dc:format'); $format->appendChild($domDocument1->createTextNode('image/jpeg')); $record->appendChild($format); # Append record07 to the returned array. $records[] = $record; # Append record07 to the search results element. $searchResults1->appendChild($record); # record08 # # urn:uuid:66ae76b7-54ba-489b-a582-0f0633d96493 # title5 # http://purl.org/dc/dcmitype/Text # application/xhtml+xml # Marine sediments # abstract7 # $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:66ae76b7-54ba-489b-a582-0f0633d96493')); $record->appendChild($identifier); # title $title = $domDocument1->createElement('dc:title'); $title->appendChild($domDocument1->createTextNode('title5')); $record->appendChild($title); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Text')); $record->appendChild($type); # format $format = $domDocument1->createElement('dc:format'); $format->appendChild($domDocument1->createTextNode('application/xhtml+xml')); $record->appendChild($format); # subject $subject = $domDocument1->createElement('dc:subject'); $subject->appendChild($domDocument1->createTextNode('Marine sediments')); $record->appendChild($subject); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract7')); $record->appendChild($abstract); # Append record08 to the returned array. $records[] = $record; # Append record08 to the search results element. $searchResults1->appendChild($record); # record09 # # urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63 # http://purl.org/dc/dcmitype/Dataset # title6 # Vegetation-Cropland # abstract8 # 2006-03-26Z # # 47.595 -4.097 # 51.217 0.889 # # # identifier $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63')); $record->appendChild($identifier); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Dataset')); $record->appendChild($type); # title $title = $domDocument1->createElement('dc:title'); $title->appendChild($domDocument1->createTextNode('title6')); $record->appendChild($title); # subject $subject = $domDocument1->createElement('dc:subject'); $subjectAttribute = $domDocument1->createAttribute('scheme'); $subjectAttribute->value = 'http://www.digest.org/2.1'; $subject->appendChild($subjectAttribute); $subject->appendChild($domDocument1->createTextNode('Vegetation-Cropland')); $record->appendChild($subject); # abstract $abstract = $domDocument1->createElement('dct:abstract'); $abstract->appendChild($domDocument1->createTextNode('abstract8')); $record->appendChild($abstract); # date $date = $domDocument1->createElement('dc:date'); $date->appendChild($domDocument1->createTextNode('2006-03-26Z')); $record->appendChild($date); # bounding box $boundingBox = $domDocument1->createElement('ows:BoundingBox'); $boundingBoxAttribute = $domDocument1->createAttribute('crs'); $boundingBoxAttribute->value = 'urn:x-ogc:def:crs:EPSG:6.11:4326'; $boundingBox->appendChild($boundingBoxAttribute); # lower corner $lowerCorner = $domDocument1->createElement('ows:LowerCorner'); $lowerCorner->appendChild($domDocument1->createTextNode('47.595 -4.097')); $boundingBox->appendChild($lowerCorner); $record->appendChild($boundingBox); # upper corner $upperCorner = $domDocument1->createElement('ows:UpperCorner'); $upperCorner->appendChild($domDocument1->createTextNode('51.217 0.889')); $boundingBox->appendChild($upperCorner); $record->appendChild($boundingBox); # Append record02 to the returned array. $records[] = $record; # Append record02 to the search results element. $searchResults1->appendChild($record); # record10 # # urn:uuid:6a3de50b-fa66-4b58-a0e6-ca146fdd18d4 # http://purl.org/dc/dcmitype/Service # title7 # Vegetation # urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63 # # identifier $record = $domDocument1->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); $identifier = $domDocument1->createElement('dc:identifier'); $identifier->appendChild($domDocument1->createTextNode('urn:uuid:6a3de50b-fa66-4b58-a0e6-ca146fdd18d4')); $record->appendChild($identifier); # type $type = $domDocument1->createElement('dc:type'); $type->appendChild($domDocument1->createTextNode('http://purl.org/dc/dcmitype/Service')); $record->appendChild($type); # title $title = $domDocument1->createElement('dc:title'); $title->appendChild($domDocument1->createTextNode('title7')); $record->appendChild($title); # subject $subject = $domDocument1->createElement('dc:subject'); $subjectAttribute = $domDocument1->createAttribute('scheme'); $subjectAttribute->value = 'http://www.digest.org/2.1'; $subject->appendChild($subjectAttribute); $subject->appendChild($domDocument1->createTextNode('Vegetation')); $record->appendChild($subject); # relation $relation = $domDocument1->createElement('dc:relation'); $relation->appendChild($domDocument1->createTextNode('urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63')); $record->appendChild($relation); # Append record10 to the returned array. $records[] = $record; # Append record10 to the search results element. $searchResults1->appendChild($record); $getRecordsResponse1->appendChild($searchResults1); $domDocument1->appendChild($getRecordsResponse1); # record11 # # urn:uuid:11111111-1111-1111-1111-111111111111 # http://purl.org/dc/dcmitype/Dataset # title8 # Vegetation-Cropland # abstract8 # 2006-03-26Z # urn:uuid:88247b56-4cbc-4df9-9860-db3f8042e357 # # 47.595 -4.097 # 51.217 0.889 # # $record = $domDocument2->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument2->createElement('dc:identifier'); $identifier->appendChild($domDocument2->createTextNode('urn:uuid:11111111-1111-1111-1111-111111111111')); $record->appendChild($identifier); # type $type = $domDocument2->createElement('dc:type'); $type->appendChild($domDocument2->createTextNode('http://purl.org/dc/dcmitype/Service')); $record->appendChild($type); # title $title = $domDocument2->createElement('dc:title'); $title->appendChild($domDocument2->createTextNode('title8')); $record->appendChild($title); # subject $subject = $domDocument2->createElement('dc:subject'); $subjectAttribute = $domDocument2->createAttribute('scheme'); $subjectAttribute->value = 'http://www.digest.org/2.1'; $subject->appendChild($subjectAttribute); $subject->appendChild($domDocument2->createTextNode('Vegetation')); $record->appendChild($subject); # abstract $abstract = $domDocument2->createElement('dct:abstract'); $abstract->appendChild($domDocument2->createTextNode('abstract9')); $record->appendChild($abstract); # date $date = $domDocument2->createElement('dc:date'); $date->appendChild($domDocument2->createTextNode('2007-03-26Z')); $record->appendChild($date); # relation $relation = $domDocument2->createElement('dc:relation'); $relation->appendChild($domDocument2->createTextNode('urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63')); $record->appendChild($relation); # Append record11 to the returned array. $records[] = $record; # Append record11 to the search results element. $searchResults2->appendChild($record); # record12 # # urn:uuid:22222222-2222-2222-2222-222222222222 # http://purl.org/dc/dcmitype/Dataset # title9 # Vegetation-Cropland # abstract8 # 2006-03-26Z # urn:uuid:88247b56-4cbc-4df9-9860-db3f8042e357 # # 47.595 -4.097 # 51.217 0.889 # # $record = $domDocument2->createElementNS('http://www.opengis.net/cat/csw/2.0.2', 'csw:Record'); # identifier $identifier = $domDocument2->createElement('dc:identifier'); $identifier->appendChild($domDocument2->createTextNode('urn:uuid:22222222-2222-2222-2222-222222222222')); $record->appendChild($identifier); # type $type = $domDocument2->createElement('dc:type'); $type->appendChild($domDocument2->createTextNode('http://purl.org/dc/dcmitype/Service')); $record->appendChild($type); # title $title = $domDocument2->createElement('dc:title'); $title->appendChild($domDocument2->createTextNode('title9')); $record->appendChild($title); # subject $subject = $domDocument2->createElement('dc:subject'); $subjectAttribute = $domDocument2->createAttribute('scheme'); $subjectAttribute->value = 'http://www.digest.org/2.1'; $subject->appendChild($subjectAttribute); $subject->appendChild($domDocument2->createTextNode('Vegetation')); $record->appendChild($subject); # abstract $abstract = $domDocument2->createElement('dct:abstract'); $abstract->appendChild($domDocument2->createTextNode('abstract10')); $record->appendChild($abstract); # date $date = $domDocument2->createElement('dc:date'); $date->appendChild($domDocument2->createTextNode('2008-03-26Z')); $record->appendChild($date); # relation $relation = $domDocument2->createElement('dc:relation'); $relation->appendChild($domDocument2->createTextNode('urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63')); $record->appendChild($relation); # Append record12 to the returned array. $records[] = $record; # Append record12 to the search results element. $searchResults2->appendChild($record); $getRecordsResponse2->appendChild($searchResults2); $domDocument2->appendChild($getRecordsResponse2); if(1 <= intval($_GET["startPosition"]) && intval($_GET["startPosition"]) <= 10) { $recordsResponse = $domDocument1->saveXML(); } elseif(11 <= intval($_GET["startPosition"]) && intval($_GET["startPosition"]) <= 12) { $recordsResponse = $domDocument2->saveXML(); } echo $recordsResponse; # print ""; ?>