<!--
     redirect to maps.google.com query
     with xml-stylesheet PI URL query arg
-->
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
  <xsl:output method="html"/>

  <xsl:template match="/">
    <html>
      <xsl:element name="head">
        <xsl:element name="meta">
          <xsl:attribute name="http-equiv">refresh</xsl:attribute>

          <xsl:attribute name="content">
            <xsl:value-of select="
              concat(
                '0; URL=http://maps.google.de/maps?q=',
                substring-before(
                  substring-after(
                    substring-after(
                      /processing-instruction()
                        [local-name()='xml-stylesheet'],
                      'href=&quot;'
                    ),
                    '?'
                  ),
                  '&quot;'
                )
              )" 
            />
          </xsl:attribute>
        </xsl:element>
      </xsl:element>
    </html>
  </xsl:template>

</xsl:stylesheet>