<commit_before>Imports

    >>> from owslib import fes    
    >>> from owslib.dif import namespaces 
    >>> from owslib.csw import CatalogueServiceWeb as cs
    >>> from lxml import etree

    >>> c=cs('http://geodiscover.cgdi.ca/wes/serviceManagerCSW/csw',timeout=30)
    >>> c.identification.title
    'Compusult CSW'
    >>> c.identification.version
    '2.0.2'
    >>> c.provider.name
    'Compusult Ltd.'
    >>> c.getdomain('GetRecords.outputSchema')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ExceptionReport: 'Internal Error'
    >>> c.response
    '<?xml version="1.0" encoding="ISO-8859-1"?><ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"><ows:Exception exceptionCode="NoApplicableCode" locator=""><ows:ExceptionText>Internal Error</ows:ExceptionText></ows:Exception></ows:ExceptionReport>\r\n'

    >>> prop = fes.PropertyIsLike("csw:AnyText", "birds")
    >>> c.getrecords2([prop])
    >>> c.results['matches']
    100
    >>> c.results['returned']
    10
    >>> c.records['9250AA67-F3AC-6C12-0CB9-0662231AA181'].title
    'ALLSPECIES'
    >>> c.records['9250AA67-F3AC-6C12-0CB9-0662231AA181'].abstract
    '272 Categorized Initiatives: Initiatives are referenced to a Category, Sub-Category and Subject Term index, through the cititzen science web site at http://www.citizenscience.ca'
    >>> c.getrecordbyid(['9250AA67-F3AC-6C12-0CB9-0662231AA181'])

    >>> prop = fes.PropertyIsLike("csw:AnyText", "hydrology")
    >>> c.getrecords2([prop], outputschema='http://www.isotc211.org/2005/gmd')
    >>> c.exceptionreport

    >>> prop = fes.PropertyIsLike("csw:AnyText", "hydrology")
    >>> c.getrecords2([prop], outputschema='http://www.isotc211.org/2005/gmd', maxrecords=2)
    >>> c.results['returned']
    2

    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].identification.title
    'World Glaciology Data, Geological Survey of Canada'
    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].identifier
    'World Glaciology Data, Geological Survey of Canada.xml'
    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].stdname
    'ISO/TC 211 Geographic Information/Geomatics'
    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].stdver
    'ISO 19115:2003'
    >>> c.harvest('somefile','someuri')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ExceptionReport: 'Access to Harvest denied'
    >>> c.response
    '<?xml version="1.0" encoding="ISO-8859-1"?><ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"><ows:Exception exceptionCode="NoApplicableCode" locator="Access"><ows:ExceptionText>Access to Harvest denied</ows:ExceptionText></ows:Exception></ows:ExceptionReport>\r\n'

    >>> prop = fes.PropertyIsLike("csw:AnyText", "glacial")
    >>> c.getrecords2([prop], outputschema='http://www.fgdc.gov')
    >>> c.results['matches'] > 300
    True
    >>> c.results['nextrecord']
    11

    >>> c.getrecords2([prop], outputschema='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/', maxrecords=2)
    >>> c.results['returned']
    2
    >>> c.results['nextrecord']
    3
    >>> sortBy=fes.SortBy([fes.SortProperty("dc:title", "ASC")])
    >>> c.getrecords2([prop], outputschema='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/', maxrecords=2, sortby=sortBy)
    >>> xml=etree.XML(c.response)
    >>> xml.findtext(".//dif:Entry_Title",namespaces=namespaces)
    'Agu Bay and Easter Cape (Surficial AS1959)'
    >>> sortBy=fes.SortBy([fes.SortProperty("dc:title", "DESC")])
    >>> c.getrecords2([prop], outputschema='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/', maxrecords=2, sortby=sortBy)
    >>> xml=etree.XML(c.response)
    >>> xml.findtext(".//dif:Entry_Title",namespaces=namespaces)
    'Young Inlet (Surficial OF3450)'<commit_msg>Use owslib.etree instead of lxml<commit_after>Imports

    >>> from owslib import fes    
    >>> from owslib.dif import namespaces 
    >>> from owslib.csw import CatalogueServiceWeb as cs
    >>> from owslib.etree import etree

    >>> c=cs('http://geodiscover.cgdi.ca/wes/serviceManagerCSW/csw',timeout=30)
    >>> c.identification.title
    'Compusult CSW'
    >>> c.identification.version
    '2.0.2'
    >>> c.provider.name
    'Compusult Ltd.'
    >>> c.getdomain('GetRecords.outputSchema')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ExceptionReport: 'Internal Error'
    >>> c.response
    '<?xml version="1.0" encoding="ISO-8859-1"?><ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"><ows:Exception exceptionCode="NoApplicableCode" locator=""><ows:ExceptionText>Internal Error</ows:ExceptionText></ows:Exception></ows:ExceptionReport>\r\n'

    >>> prop = fes.PropertyIsLike("csw:AnyText", "birds")
    >>> c.getrecords2([prop])
    >>> c.results['matches']
    100
    >>> c.results['returned']
    10
    >>> c.records['9250AA67-F3AC-6C12-0CB9-0662231AA181'].title
    'ALLSPECIES'
    >>> c.records['9250AA67-F3AC-6C12-0CB9-0662231AA181'].abstract
    '272 Categorized Initiatives: Initiatives are referenced to a Category, Sub-Category and Subject Term index, through the cititzen science web site at http://www.citizenscience.ca'
    >>> c.getrecordbyid(['9250AA67-F3AC-6C12-0CB9-0662231AA181'])

    >>> prop = fes.PropertyIsLike("csw:AnyText", "hydrology")
    >>> c.getrecords2([prop], outputschema='http://www.isotc211.org/2005/gmd')
    >>> c.exceptionreport

    >>> prop = fes.PropertyIsLike("csw:AnyText", "hydrology")
    >>> c.getrecords2([prop], outputschema='http://www.isotc211.org/2005/gmd', maxrecords=2)
    >>> c.results['returned']
    2

    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].identification.title
    'World Glaciology Data, Geological Survey of Canada'
    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].identifier
    'World Glaciology Data, Geological Survey of Canada.xml'
    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].stdname
    'ISO/TC 211 Geographic Information/Geomatics'
    >>> c.records['World Glaciology Data, Geological Survey of Canada.xml'].stdver
    'ISO 19115:2003'
    >>> c.harvest('somefile','someuri')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ExceptionReport: 'Access to Harvest denied'
    >>> c.response
    '<?xml version="1.0" encoding="ISO-8859-1"?><ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"><ows:Exception exceptionCode="NoApplicableCode" locator="Access"><ows:ExceptionText>Access to Harvest denied</ows:ExceptionText></ows:Exception></ows:ExceptionReport>\r\n'

    >>> prop = fes.PropertyIsLike("csw:AnyText", "glacial")
    >>> c.getrecords2([prop], outputschema='http://www.fgdc.gov')
    >>> c.results['matches'] > 300
    True
    >>> c.results['nextrecord']
    11

    >>> c.getrecords2([prop], outputschema='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/', maxrecords=2)
    >>> c.results['returned']
    2
    >>> c.results['nextrecord']
    3
    >>> sortBy=fes.SortBy([fes.SortProperty("dc:title", "ASC")])
    >>> c.getrecords2([prop], outputschema='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/', maxrecords=2, sortby=sortBy)
    >>> xml=etree.fromstring(c.response)
    >>> xml.findtext(".//dif:Entry_Title",namespaces=namespaces)
    'Agu Bay and Easter Cape (Surficial AS1959)'
    >>> sortBy=fes.SortBy([fes.SortProperty("dc:title", "DESC")])
    >>> c.getrecords2([prop], outputschema='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/', maxrecords=2, sortby=sortBy)
    >>> xml=etree.fromstring(c.response)
    >>> xml.findtext(".//dif:Entry_Title",namespaces=namespaces)
    'Young Inlet (Surficial OF3450)'
{'fraction_non_alphanumeric': 0.18130182892195842, 'fraction_numerical': 0.04134953992956947, 'mean_word_length': 4.294046903187011, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 4, '>': 305, 'https://': 0, 'lorem ipsum': 0, 'www.': 24, 'xml': 38}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6408070', 'n_tokens_mistral': 3299, 'n_tokens_neox': 3066, 'n_words': 463}