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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 28th, 2003, 03:10 PM
Ricardo Ricardo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 Ricardo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy XSL Transformation works fine locally but not when the files are uploaded

Hi everyone!

Please help me with this problem.

I am using the follwing javascript code to do an XSL-XML transformation. It's working fine on my computer when I double-click the html page but once the files are uploaded the transformation doesn't work there.

Even more if I test the pages through the IIS as a virtual directory (but still in my computer) it doesn't work neither.

I am figuring out the problem is because the "xml/hotel_list.xml" and "xml/hotel_list.xsl" relative paths are not working in the xslDoc.load statements but I have tested several alternatives using "http://..." paths and I can't make this work.

I would appreciate any help you can give me I am feeling lost and frustated.

This is the javascript function:
function filter_destino(filtro_destino,column){
try{
var xslDoc = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
xslDoc.load("xml/hotel_list.xsl");

var xslt = new ActiveXObject("MSXML2.XSLTemplate");
xslt.stylesheet = xslDoc;

var xslProc = xslt.createProcessor();
xslProc.addParameter("column", column);
xslProc.addParameter("filtro_destino", filtro_destino);

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("xml/hotel_list.xml");

xslProc.input = xmlDoc;
xslProc.transform();

document.all.item("xslContainer").innerHTML=xslProc.output;


}catch(exception){
}
}

The function is called from an html on the Body onLoad event:

<BODY onLoad="filter_destino('Cancun','HOTEL_NAME');">

The javascript function is in a external file referenced at the head section in this html page.
<script language="javascript" src="javascripts/filter.js"></script>

The first lines of the xsl files are:
<?xml version='1.0' encoding='iso-8859-1' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html" indent="yes" encoding="iso-8859-1" media-type="text/html"/>
<xsl:param name="column" select="'HOTEL_NAME'" />
<xsl:param name="name" select="''" />
<xsl:param name="filtro_destino" select="''" />
<xsl:variable name="destino" select="HOTEL[HOTEL_DESTINATION=$filtro_destino]" />

Thanks in advance.

Ricardo

Reply With Quote
  #2  
Old November 7th, 2003, 06:49 PM
teedee teedee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 42 teedee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
You're loading the XSL over http so you'll need to specify xslDoc.async=false

If that doesn't work then check that the XML and XSL are being loaded into the domdocuments ...

if (xmlDoc.load("xml/hotel_list.xml"))
{
alert("XML Loaded ok");
}
else
{
alert (xmlDoc.parseError.reason);
}

Does IE show a warning message about creating an ActiveX object when the page loads? Could be your security settings preventing you from running the script?

Reply With Quote
  #3  
Old November 25th, 2003, 07:01 AM
xova xova is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Israel
Posts: 3 xova User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
same xsl problem

hi
im facing a very similar problem
the xmlns:xsl='www.w3.org/tr/xsl-wd' works fine on one computer but causes a crash on another.
did you find anymore data on this?
will be happy to get anything on it
thanks
xova

Reply With Quote
  #4  
Old November 28th, 2003, 06:39 AM
mikefmi mikefmi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 7 mikefmi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I think you should check your zone permissions in IE settings concerning ActiveX. I had the same problem while using other ActiveX objects in JavaScript and note, this will match for other your page visitors.

Reply With Quote
  #5  
Old November 28th, 2003, 09:15 AM
RogueGunner's Avatar
RogueGunner RogueGunner is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 64 RogueGunner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 5
I have a similar problem it get this back:

I am getting my information back but gibberish too why is this? It runs fine on my server just not when i upload it.

㰼ⴡ‭䕂䥇⁎整瑸朠湥牥瑡摥戠⁹敳癲牥‮䱐䅅䕓删䵅噏⁅ⴭਾ⼼扯敪瑣㰾氯祡牥㰾搯癩㰾猯慰㹮⼼瑳汹㹥⼼潮捳楲瑰㰾琯扡敬㰾猯牣灩㹴⼼灡汰瑥ਾ猼牣灩⁴慬杮慵敧∽慪慶捳楲瑰㸢瘊牡朠潯汧彥慬杮慵敧∽湥㬢㰊猯牣灩㹴㰊 捳楲瑰氠湡畧条㵥樢癡獡牣灩≴猠捲∽瑨灴⼺眯睷戮楲歮瑳牥挮浯戯楲歮樮≳㰾猯牣灩㹴㰊捳楲瑰氠湡畧条㵥樢癡獡牣灩≴眾潄⡌琢灯⤢㰻猯牣灩㹴㰊捳楲瑰氠湡畧条㵥樢癡獡牣灩≴眾汃⡳㬩⼼捳楲瑰ਾ猼牣灩⁴慬杮慵敧∽慪慶 捳楲瑰㸢䑷䱯∨瑢≭㬩⼼捳楲瑰ਾ猼牣灩⁴慬杮慵敧∽慊慶捓楲瑰㸢桳睯⡁摡摉㬩⼼捳楲瑰ਾℼⴭ䔠䑎琠硥⁴敧敮慲整⁤祢猠牥敶⹲倠䕌十⁅䕒位䕖ⴠ㸭pse: collapse" bordercolor="#999999" width="160" bgcolor="#5C7287">MavCom InformationE-mail =Typhon=



MavCom

3



MavCom

13



MavCom

14


䐀噉ാ㰊戯摯㹹਍਍⼼瑨汭ാ㰊ⴡ‭䕂䥇⁎整瑸朠湥牥瑡摥戠⁹敳癲牥‮䱐䅅䕓删䵅噏⁅ⴭਾ⼼扯敪瑣㰾氯祡牥㰾搯癩㰾猯慰㹮⼼瑳汹㹥⼼潮捳楲瑰㰾琯扡敬㰾猯牣灩㹴⼼灡汰瑥ਾ猼牣灩⁴慬杮慵敧∽慪慶捳楲瑰㸢瘊牡朠潯汧彥 慬杮慵敧∽湥㬢㰊猯牣灩㹴㰊捳楲瑰氠湡畧条㵥樢癡獡牣灩≴猠捲∽瑨灴⼺眯睷戮楲歮瑳牥挮浯戯楲歮樮≳㰾猯牣灩㹴㰊捳楲瑰氠湡畧条㵥樢癡獡牣灩≴眾潄⡌琢灯⤢㰻猯牣灩㹴㰊捳楲瑰氠湡畧条㵥樢癡獡牣灩≴眾汃⡳㬩⼼捳楲 瑰ਾ猼牣灩⁴慬杮慵敧∽慪慶捳楲瑰㸢䑷䱯∨瑢≭㬩⼼捳楲瑰ਾ猼牣灩⁴慬杮慵敧∽慊慶捓楲瑰㸢桳睯⡁摡摉㬩⼼捳楲瑰ਾℼⴭ䔠䑎琠硥⁴敧敮慲整⁤

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSL Transformation works fine locally but not when the files are uploaded


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 3 hosted by Hostway