XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Yama KamyarSubject: msxml script
Author: Yama Kamyar
Date: 28 Mar 2005 05:02 PM
Hi,

I have a windows application that makes use of a XSLT to parse XML data.

1. Would msxml:script execute if IE has javascript disabled?
2. Would msxml:script execute if IE is not the default browser?

The code uses C#'s XslTranform() function to write the output.

Thanks,

~yamazed

Postnext
Ivan PedruzziSubject: msxml script
Author: Ivan Pedruzzi
Date: 28 Mar 2005 09:03 PM

XslTranform supports script extensions written in C#, Visual Basic, and Jscript.
The extensions are not affected by the IE settings.

Posttop
Yama KamyarSubject: msxml script
Author: Yama Kamyar
Date: 28 Mar 2005 09:32 PM
Thanks for the reply.

So if I had an XML file

*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-

<?xml version="1.0" encoding="ISO-8859-1" ?>

<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
</CATALOG>

*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-

And a XSLT file with:

*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:regExp="http://exslt.org/regular-expressions" extension-element-prefixes="regExp msxsl">
<msxsl:script language="JavaScript" implements-prefix="regExp">
<![CDATA[
/** Some scripting code **/
]]>
</msxsl:script>
<!-- Some XSLT code here -->
</xsl:stylesheet>

*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-

Then I use in C#

*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-

//Create a new XslTransform object.
XslTransform xslt = new XslTransform();

//Load the stylesheet.
xslt.Load(xslFilePath); //the path the XSLT file is saved on PC (i.e. "C:\myScriptXSLT")

// Read the string into the xmltext reader
XmlTextReader xr = new XmlTextReader(new StringReader(xmlData)); //xml string such as above


//Create a new XPathDocument and load the XML data to be transformed.
XPathDocument _data = new XPathDocument(xr);

System.IO.MemoryStream aMemStr = new System.IO.MemoryStream();

//Create an XmlTextWriter which outputs to the console.
XmlWriter writer = new XmlTextWriter(aMemStr, null);

//Transform the data and send the output to the console.
xslt.Transform(_data, null, writer, null);

writer.Close();

*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-*_*-


So the settings of IE won't care about the written javascript script in the XSLT file?

Is there a place that will testify this (Microsoft or W3C link)?

Once again thanks,

~yamazed

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.