EDN Admin
Well-known member
Below is my TEST.XML file
<div style="color:black; background-color:white
<pre><span style="color:blue <<span style="color:#a31515 catalog<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 package<span style="color:blue >A<span style="color:blue </<span style="color:#a31515 package<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 id<span style="color:blue >1<span style="color:blue </<span style="color:#a31515 id<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 title<span style="color:blue >Empire Burlesque<span style="color:blue </<span style="color:#a31515 title<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 artist<span style="color:blue >Bob Dylan<span style="color:blue </<span style="color:#a31515 artist<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 country<span style="color:blue >USA<span style="color:blue </<span style="color:#a31515 country<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 company<span style="color:blue >Columbia<span style="color:blue </<span style="color:#a31515 company<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 price<span style="color:blue >10.90<span style="color:blue </<span style="color:#a31515 price<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 year<span style="color:blue >1985<span style="color:blue </<span style="color:#a31515 year<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 package<span style="color:blue >A<span style="color:blue </<span style="color:#a31515 package<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 id<span style="color:blue >1<span style="color:blue </<span style="color:#a31515 id<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 title<span style="color:blue >Hide your heart<span style="color:blue </<span style="color:#a31515 title<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 artist<span style="color:blue >Bonnie Tyler<span style="color:blue </<span style="color:#a31515 artist<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 country<span style="color:blue >UK<span style="color:blue </<span style="color:#a31515 country<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 company<span style="color:blue >CBS Records<span style="color:blue </<span style="color:#a31515 company<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 price<span style="color:blue >9.90<span style="color:blue </<span style="color:#a31515 price<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 year<span style="color:blue >1988<span style="color:blue </<span style="color:#a31515 year<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 catalog<span style="color:blue >
[/code]
<br/>
this is my TEST.XSL file
<div style="color:black; background-color:white
<pre><span style="color:blue <?<span style="color:#a31515 xml <span style="color:red version<span style="color:blue =<span style="color:black "<span style="color:blue 1.0<span style="color:black "<span style="color:blue ?>
<span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 stylesheet <span style="color:red version<span style="color:blue =<span style="color:black "<span style="color:blue 1.0<span style="color:black "
<span style="color:red xmlns:xsl<span style="color:blue =<span style="color:black "<span style="color:blue http://www.w3.org/1999/XSL/Transform<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 template <span style="color:red match<span style="color:blue =<span style="color:black "<span style="color:blue /<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 html<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 body<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 h2<span style="color:blue >My CD Collection<span style="color:blue </<span style="color:#a31515 h2<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 table <span style="color:red border<span style="color:blue =<span style="color:black "<span style="color:blue 1<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 tr <span style="color:red bgcolor<span style="color:blue =<span style="color:black "<span style="color:blue #9acd32<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 th<span style="color:blue >Title<span style="color:blue </<span style="color:#a31515 th<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 th<span style="color:blue >Artist<span style="color:blue </<span style="color:#a31515 th<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 th<span style="color:blue >Price<span style="color:blue </<span style="color:#a31515 th<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 tr<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 for-each <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue catalog/cd<span style="color:black "<span style="color:blue ><br/><span style="color:blue <<span style="color:#a31515 tr<span style="color:blue ><span style="color:blue <br/><<span style="color:blue <span style="color:#a31515 td<span style="color:blue ><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 value-of <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue title<span style="color:black "<span style="color:blue /><span style="color:blue </<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 value-of <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue artist<span style="color:black "<span style="color:blue /><span style="color:blue </<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 value-of <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue price<span style="color:black "<span style="color:blue /><span style="color:blue </<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 tr<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 for-each<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 table<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 body<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 html<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 template<span style="color:blue ><br/><span style="color:blue </<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 stylesheet<span style="color:blue >
[/code]
<div style="color:black; background-color:white
<pre><span style="background-color:yellow <%
Load XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("test.xml"))
Load XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("test.xsl"))
Transform file
Response.Write(xml.transformNode(xsl))
<span style="background-color:yellow %>
[/code]
<br/>
<br/>
I need to pass a variable value to the xsl file how?
I need to add that value with XML price
For example
Value=10
in the xsl i need
<div style="color:black; background-color:white
<pre>10.90 + 10 =20.90
[/code]
<br/>
View the full article
<div style="color:black; background-color:white
<pre><span style="color:blue <<span style="color:#a31515 catalog<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 package<span style="color:blue >A<span style="color:blue </<span style="color:#a31515 package<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 id<span style="color:blue >1<span style="color:blue </<span style="color:#a31515 id<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 title<span style="color:blue >Empire Burlesque<span style="color:blue </<span style="color:#a31515 title<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 artist<span style="color:blue >Bob Dylan<span style="color:blue </<span style="color:#a31515 artist<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 country<span style="color:blue >USA<span style="color:blue </<span style="color:#a31515 country<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 company<span style="color:blue >Columbia<span style="color:blue </<span style="color:#a31515 company<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 price<span style="color:blue >10.90<span style="color:blue </<span style="color:#a31515 price<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 year<span style="color:blue >1985<span style="color:blue </<span style="color:#a31515 year<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 package<span style="color:blue >A<span style="color:blue </<span style="color:#a31515 package<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 id<span style="color:blue >1<span style="color:blue </<span style="color:#a31515 id<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 title<span style="color:blue >Hide your heart<span style="color:blue </<span style="color:#a31515 title<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 artist<span style="color:blue >Bonnie Tyler<span style="color:blue </<span style="color:#a31515 artist<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 country<span style="color:blue >UK<span style="color:blue </<span style="color:#a31515 country<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 company<span style="color:blue >CBS Records<span style="color:blue </<span style="color:#a31515 company<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 price<span style="color:blue >9.90<span style="color:blue </<span style="color:#a31515 price<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 year<span style="color:blue >1988<span style="color:blue </<span style="color:#a31515 year<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 cd<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 catalog<span style="color:blue >
[/code]
<br/>
this is my TEST.XSL file
<div style="color:black; background-color:white
<pre><span style="color:blue <?<span style="color:#a31515 xml <span style="color:red version<span style="color:blue =<span style="color:black "<span style="color:blue 1.0<span style="color:black "<span style="color:blue ?>
<span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 stylesheet <span style="color:red version<span style="color:blue =<span style="color:black "<span style="color:blue 1.0<span style="color:black "
<span style="color:red xmlns:xsl<span style="color:blue =<span style="color:black "<span style="color:blue http://www.w3.org/1999/XSL/Transform<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 template <span style="color:red match<span style="color:blue =<span style="color:black "<span style="color:blue /<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 html<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 body<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 h2<span style="color:blue >My CD Collection<span style="color:blue </<span style="color:#a31515 h2<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 table <span style="color:red border<span style="color:blue =<span style="color:black "<span style="color:blue 1<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 tr <span style="color:red bgcolor<span style="color:blue =<span style="color:black "<span style="color:blue #9acd32<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 th<span style="color:blue >Title<span style="color:blue </<span style="color:#a31515 th<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 th<span style="color:blue >Artist<span style="color:blue </<span style="color:#a31515 th<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 th<span style="color:blue >Price<span style="color:blue </<span style="color:#a31515 th<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 tr<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 for-each <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue catalog/cd<span style="color:black "<span style="color:blue ><br/><span style="color:blue <<span style="color:#a31515 tr<span style="color:blue ><span style="color:blue <br/><<span style="color:blue <span style="color:#a31515 td<span style="color:blue ><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 value-of <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue title<span style="color:black "<span style="color:blue /><span style="color:blue </<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 value-of <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue artist<span style="color:black "<span style="color:blue /><span style="color:blue </<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <br/><span style="color:blue <<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 value-of <span style="color:red select<span style="color:blue =<span style="color:black "<span style="color:blue price<span style="color:black "<span style="color:blue /><span style="color:blue </<span style="color:#a31515 td<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 tr<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 for-each<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 table<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 body<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 html<span style="color:blue ><span style="color:blue <br/><span style="color:blue </<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 template<span style="color:blue ><br/><span style="color:blue </<span style="color:#a31515 xsl<span style="color:blue :<span style="color:#a31515 stylesheet<span style="color:blue >
[/code]
<div style="color:black; background-color:white
<pre><span style="background-color:yellow <%
Load XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("test.xml"))
Load XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("test.xsl"))
Transform file
Response.Write(xml.transformNode(xsl))
<span style="background-color:yellow %>
[/code]
<br/>
<br/>
I need to pass a variable value to the xsl file how?
I need to add that value with XML price
For example
Value=10
in the xsl i need
<div style="color:black; background-color:white
<pre>10.90 + 10 =20.90
[/code]
<br/>
View the full article