|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 ![]() |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > works here, but not there? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|