XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 13th, 2003, 04:35 PM
s_c_gardner s_c_gardner is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: NYC
Posts: 8 s_c_gardner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
works here, but not there?

Hi,

I have some xml, xslt, and html files I've developed which work -- but only in the folder I originally created them in. When I move them all to another folder or out to the internet, they give me errors (specifically, "The stylesheet does not contain a document element. It may not be a well-formed document, or it may be empty")

My html file uses a pretty simple javascript transform:

<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("MAD.xml")

// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("MADbyAMT.xsl")

// Transform
document.write(xml.transformNode(xsl))
</script>


The MAD.xml and MADbyAMT.xslt folder are in the same directory as the html file. The xslt file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>KBW - Mergers & Acquisitions</title>
</head>
<body>
<xsl:for-each select="Import/Row">
<xsl:sort select="substring(date_announced, 1, 4)" data-type="number" order="descending"/>
<xsl:sort select="deal_amount" data-type="number" order="descending"/>
<tr>
<td><font size="-1">
<xsl:value-of select="substring(date_announced, 6, 2)"/>/<xsl:value-of select="substring(date_announced, 9, 2)"/>/<xsl:value-of select="substring(date_announced, 3, 2)"/>
</font>
</td>
<xsl:if test="kbw_side = 'O'">
<td><font size="-1">
<xsl:value-of select="acquiror_name"/>(
<xsl:value-of select="acquiror_state"/>)
</font>
</td>
<td><font size="-1">

Acquisition of <xsl:value-of select="acquiree_name"/>(<xsl:value-of select="acquiree_state"/>)
</font>
</td>
blah, blah, blah. . . I don't think anything following is what's causing the problem.

Anyway, the most puzzling thing is it working in one location but not others. At this point I'd be pretty happy for any advice on t-shooting this.

Thanks,

Sam

Reply With Quote
  #2  
Old August 18th, 2003, 08:39 AM
s_c_gardner s_c_gardner is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: NYC
Posts: 8 s_c_gardner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Okay, I have some additional info which might help -- the original folder I created the files in is on the network and is my working directory. I have found that the files work in ANY folder with 8 characters or less in the title (i.e., the files do not work under long filenames). Advice?

Last edited by s_c_gardner : August 18th, 2003 at 01:44 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > works here, but not there?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway