<geoLocation>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="geo.xsl"?>
<geoLocation geoLinkText="Fred is here" geoName="Fred">
<geoLatLong geoLat="40" geoLong="90.0">
But without the gacky xml stuff. This would be linked in client side to whatever the client wanted to do with a location (open in gmaps/gearth/find route to/set flying cars autopilot to go to etc...). Also it could be extended to hold area or radii around points. Perhaps even altitude so that DU can place satellites in orbit.
Yes there is a huge thing at openGIS that may or may not do what I want. But reading through there documentation wasn't as much fun as hacking things out.
The first thing I thought I could do was to make a firefox plugin, it was rabbiting on about JS and DOM stuff. However I know little about that so I ended up making an XSLT thingmibob. Whether I can convert this to an xpi is another matter entirely. I also found this, which may be what I needed anyway.
<xsl:element name="a">
Filename geo.xsl
StartFile
---------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8">
<xsl:template match="">
<html>
<body>
<xsl:for-each select="geoLocation">
<xsl:attribute name="href">http://maps.google.com/maps?q=N+<xsl:for-each select="geoLatLong">
<xsl:value-of select="@geoLat">+W+<xsl:value-of select="@geoLong">
</xsl:for-each>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="@geoName">
</xsl:attribute>
<xsl:value-of select="@geoLinkText">
</xsl:element>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:output>
</xsl:stylesheet>
I figured this might be a way of sneaking it in to usage. Also would be good would to be to get something similar into wikipedia appropriately wikified. So that searches can be done on coordinates.
This codes works and gives you a link in xalan. It doesn't seem to work in Firefox although that is acting up at the moment. Haven't tried it in IE.
Also I have a schema. That was fine a while back it may need updating and re-validation.
Before this takes over the world perhaps we can have a geo macro in hulver. Pretty please.
<xs:element name="geoLocation">
<xs:sequence>
</xs:sequence>
<xs:attribute name = "geoLinkText" type="xs:string" use="required">
Filename geo.xsd
StartFile
---------
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:complexType>
<xs:element name="geoLatLong">
<xs:complexType>
<xs:attribute name="geoLat" type="xs:decimal" use="required">
<xs:attribute name="geoLong" type="xs:decimal" use="required">
</xs:complexType>
</xs:element>
<xs:attribute name = "geoName" type="xs:string">
</xs:complexType>
</xs:element>
</xs:schema>
Addenda: AAargh all the single line xml codes have had there ending slashes stripped. For reasons unknown. I blame scoop and Rusty. I shall sort this at some point in the future. IT WILL NOT WORK. All code is for purely aesthetic qualities at the moment. It should produce this
Fred is here
< Hi | BBC White season: 'Rivers of Blood' > |