Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
Stylus Studio Technical Forum
»
msxml script
Topic
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
next
Subject:
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
next
Subject:
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.
top
Subject:
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
Topic Page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Prev Topic
Next Topic
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.