Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 14th, 2007, 04:45 PM
Registered User
Join Date: Mar 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tomharding
Default XSL, Javascript and Google maps..

Hey all,

I'm really scratching my head over this problem here. I'm trying to get an XSL transformation to display google maps. I've stripped down the very basics and used the Google Maps Hello World script, but in XSL formatting.

The problem? It works fine and dandy in IE, but not in Firefox.

I tried the same hello world script in HTML format and it worked fine in both browsers.

Heres my script:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"

<xsl:template match="/">

<html xmlns="http://www.w3.org/1999/xhtml">

<title>Google Maps JavaScript API Example</title>

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAArwtl8H-0vkbKUJQSKii7aBSmvnqj_jvWX9jzbAfFZqVyU1JN7hRy418Mp VHZx_OGhzqNA5ya6la-ZQ"
language="text/javascript" />
<script language="text/javascript">


function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);

<body onload_="load()" onunload_="GUnload()">
<div id="map" style="width:500px; height:300px;"></div>
<br />boo


I've tried removing the slashes surrounding the CDATA as advised on other forums, but that didn't make any difference.

The 'hello' and 'boo' are just there for no reason at all.

I'm really really stumped. Whats worse is that this is for a final year project which makes it 10x worse!!

Using the web developer toolbar, i outputted the generated source and the second <script> tags come back as normal text. The CDATA only appears as slashes, whereas in the HTML version it appears in its entirety.

Could anyone tell me what I'm doing drastically wrong, before my skull cracks from banging it on the desk?

Thanks in advance,

Reply With Quote
  #2 (permalink)  
Old March 14th, 2007, 06:05 PM
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2006
Location: , , .
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher

Did you try removing the "//<![CDATA[" all together, I dont think you need this.

Reply With Quote
  #3 (permalink)  
Old March 14th, 2007, 06:10 PM
Registered User
Join Date: Mar 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tomharding

Hey, thanks for the quick reply :)

And removing it didn't make any difference. Looking at the outputted javascript, the second <script> tag only appears as text too, strangely enough.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacked Bills Google Maps Code ramone_johnny Classic ASP Basics 5 August 5th, 2008 10:11 PM
Bills Whiz Bang Google Maps ramone_johnny Classic ASP Basics 2 August 1st, 2008 07:23 PM
Google Maps JS in ASPX page error kingroon ASP.NET 2.0 Basics 0 December 7th, 2007 09:52 AM
INFO: Adding Google Maps (New ASP.Net Control) jimibt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 September 12th, 2007 03:18 AM
How to use Javascript in XSL umeshayk XSLT 3 January 16th, 2004 11:33 AM

All times are GMT -4. The time now is 09:40 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.