OEREBlex geoLink Formatter
  • Module geolink_formatter
    • GeoLinkFormatter
  • Module geolink_formatter.entity
  • Module geolink_formatter.format
  • Module geolink_formatter.parser
OEREBlex geoLink Formatter

    license python version format status build status coverage report dependencies dependencies

  • »
  • Module geolink_formatter

Module geolink_formatter¶

GeoLinkFormatter¶

class geolink_formatter.GeoLinkFormatter(host_url=None, version='1.2.0', dtd_validation=False)[source]¶

Bases: object

Creates a new GeoLinkFormatter instance.

Parameters:
  • host_url (str) – URL of the OEREBlex host to resolve relative URLs. The complete URL until but without the /api part has to be set, starting with http:// or https://.
  • version (str) – The version of the geoLink schema to be used. Defaults to 1.2.0.
  • dtd_validation (bool) – Enable/disable validation of document type definition (DTD). Optional, defaults to False.
html(source)[source]¶

Returns the HTML representation of the geoLink XML form the specified source.

Parameters:

source (str or bytes) – The geoLink source. Can be a XML string or an URL to load the XML via HTTP/HTTPS request.

Returns:

An HTML formatted string containing the documents as HTML list.

Return type:

str

Raises:
  • TypeError – Raised on invalid source type.
  • lxml.etree.XMLSyntaxError – Raised on failed validation.
  • requests.HTTPError – Raised on failed HTTP request.
Next Previous

© Copyright 2017, Amt für Geoinformation, Kanton Basel-Landschaft.

Built with Sphinx using a theme provided by Read the Docs.
View on GitHub View on GitHub
Other Versions v: v1.5.1
Tags
v2.0.1
v2.0.0
v1.5.4
v1.5.3
v1.5.2
v1.5.1
v1.5.0
v1.4.0
v1.3.1
v1.3.0
v1.2.0
v1.1.2
v1.1.1
v1.1.0
v1.0.0
Branches
master