ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE:22523

Subject: RE:22523
From: "daniel g" <dgale_@xxxxxxxxxxx>
Date: Fri, 11 Nov 2005 19:47:25 -0500
xmldoc.onload readxml
I am new to this list but am replying to 22523.
I posted it trying to find out how to change a parameter via a hyper link. I found a great website that helped me out. I have it working the way I want. I ended up splitting the project into 3 files. 1: XML 2: XSL 3: HTML . Basically I took the html out of the XSL file and made the letter param global by putting it at the top of the file. I then put this script in the html file.
<script language="javascript">


var g_letter;

function setLinkValue(clicked){
g_letter = (!clicked)?"":clicked;
pickBrowser();
}
function pickBrowser(){
var moz = (typeof document.implementation != 'undefined') &&
(typeof document.implementation.createDocument != 'undefined');
if (moz){
Load_Mozilla();
}
else{
Load_IE();
}
}


//IE scripting
function Load_IE(){
   xmlDoc = new ActiveXObject( "MSXML2.DOMDocument.3.0" );
   xslDoc = new ActiveXObject( "MSXML2.FreeThreadedDOMDocument.3.0" );
   var xslTemplate = new ActiveXObject( "MSXML2.XSLTemplate.3.0" );

   //Load in the raw XML data:
   xmlDoc.async = "false";
   xmlDoc.load( 'pass.xml' );

   //Load in the XSLT transform script:
   xslDoc.async = "false";
   xslDoc.load( 'pass.xsl' );

   xslTemplate.stylesheet = xslDoc;
   xslProcessor = xslTemplate.createProcessor( );
   xslProcessor.input = xmlDoc;

   //Overwrite the xsl:params with runtime selected values:
   xslProcessor.addParameter( "letter",        g_letter );

   //Output the XML (as processed by the XSLT) to the div target
   xslProcessor.transform();
   putTablesHere.innerHTML = xslProcessor.output;
}

//Mozilla scripting
function Load_Mozilla(){

   //Load in the raw XML data:
   xmlDoc = document.implementation.createDocument("", "", null);
   xmlDoc.load( 'pass.xml' );
   xmlDoc.onload = readXML;
}

function readXML(){

   xslDoc = document.implementation.createDocument("", "test", null);
   xslProcessor = new XSLTProcessor();

   //Load in the XSLT transform script:
   xslDoc.addEventListener("load", xslLoad, false);
   xslDoc.load( 'pass.xsl' );
}

function xslLoad(){
   xslProcessor.importStylesheet( xslDoc );

   //Overwrite the xsl:params with runtime selected values:
   xslProcessor.setParameter( "", "letter",     g_letter );

//Output the XML (as processed by the XSLT) to the div target
xmlOutput = xslProcessor.transformToDocument( xmlDoc );
var xmlSerializer = new XMLSerializer();
putTablesHere.innerHTML = xmlSerializer.serializeToString( xmlOutput );
}
</script>
I called the setLinkValue from the body onLoad attribute and I made a div in the page to post everything it's called, putTablesHere. Anyway.. props to the site that helped and here is their page http://www.gamedev.net/reference/programming/features/xmltech/page4.asp
Thanks for letting me post.
-daniel.


Current Thread
  • RE:22523
    • daniel g - 12 Nov 2005 00:47:30 -0000 <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.