Skip to content

Instantly share code, notes, and snippets.

<!-- This is an example of the key content on a typical page containing links to ward results pages, marked up appropriately to -->
<!-- expose the information as data rather than just text -->
<!-- ####### -->
<!-- ####### -->
<!-- ####### -->
<!-- We are using the <div> which wraps the content to declare the 'namespaces' for various attributes we use to give the links meaning -->
<!-- e.g. we say that when we're talking about foaf things (e.g. foaf:isPrimaryTopicOf) we mean things defined at "http://xmlns.com/foaf/0.1/" -->
<div id="mainContent" xmlns:openelection="http://openelectiondata.org/0.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<!-- This is an example of the key content on a typical page containing ward results pages, marked up appropriately to -->
<!-- expose the information as data rather than just text -->
<!-- NB The eklection data below is dummy data and has been altered to better demonstrate the markup -->
<!-- ####### -->
<!-- ####### -->
<!-- ####### -->
<!-- We start by attached basic info to the div that wraps around the data. -->
<!-- First we need to declare the XML schemas we're going to use and the shortcuts by which we'll refer to them -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Election results for Alrewas and Fradley | Lichfield District Council</title>
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/standard.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/style.php" media="screen" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/ie_special.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/ie_special_print.css" media="print" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>View our Election Results - Lichfield District Council</title>
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/standard.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/style.php" media="screen" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/ie_special.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/ie_special_print.css" media="print" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Election Results | Lichfield District Council</title>
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/standard.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/style.php" media="screen" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/ie_special.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://www.lichfielddc.gov.uk/site/styles/generic/ie_special_print.css" media="print" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
Wyre Borough Council - Previous Election Results - Jubilee Ward By-Election 2009
</title>
<!-- Meta Data Start -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<base href="http://www.richmond.gov.uk/" ></base>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="http://www.richmond.gov.uk/" ></base>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/">
<link rel="schema.eGMS" href="http://www.esd.org.uk/standards/egms/egms.rdfs">
<meta name="eGMS.accessibility" scheme="WCAG" content="Double-A">
# Rewrite in Ruby of OS northings, eastings to lat/long methods in http://www.jstott.me.uk/jscoord/
module OsCoordsNewUtilities
OSGB_F0 = 0.9996012717
N0 = -100000.0
E0 = 400000.0
extend self
def convert_os_to_wgs84(eastings, northings, height=0)