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

Create a variable at run time withXMLDOM

Subject: Create a variable at run time withXMLDOM
From: "Chris Taggart" <chris@xxxxxxxxxxxxxxxxx>
Date: Tue, 6 Mar 2001 01:25:14 -0500
chris taggart
I am trying to dynamically filter a specific subset of XML data, and after
scouring the archive for hours (and reading through Professional ASP XML),
as well as various internet sites, I've yet to find an answer, so maybe
someone here can help? was going to do the parsing for this page on the
server-side using ASP, so I was thinking I could make a modification to the
XSL, and then display the results.

My files are below,

Please contact me if you need anymore information,
Thanks so much for any suggestions!!!

Chris
===========
xmldev@xxxxxxxxxxxxxxxxx


Current ASP Page:
=====================
sourceFile = Request.ServerVariables("APPL_PHYSICAL_PATH") +
"ieatb1\data\stores.xml"
styleFile = "http://localhost/stylecontacts.xsl"

strCity = "Toronto"

Set source = Server.CreateObject("Microsoft.XMLDOM")
source.async = false
source.load(sourceFile)

Set style = Server.CreateObject("Microsoft.XMLDOM")
style.async = false
style.load(styleFile)
'***Maybe add in the value to test for strCity here?

Response.Write(source.transformNode(style))

=================================================

My Current Template (stylecontacts.xsl):
<?xml version="1.0"?>

<xsl:template xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  <HTML>
    <BODY>
      <xsl:for-each select="STORES/RETAILER">
		<xsl:if test="CITY[.='Dynamic Value']">
	        	<DIV>
		          <FONT FACE="Verdana" size="2" COLOR="blue"><B><xsl:value-of
select="@name"/></B></FONT>
			</DIV>
	        	<DIV>
       		          <FONT FACE="Verdana" size="2"><xsl:value-of
select="ADDRESS"/></FONT>
		        </DIV>
	        	<DIV>
		          <FONT FACE="Verdana" size="2"><xsl:value-of select="CITY"/>,
<xsl:value-of select="PROVINCE"/></FONT>
		        </DIV>
	        	<DIV>
		          <FONT FACE="Verdana" size="2"><xsl:value-of
select="PHONE"/></FONT>
		        </DIV>
	        	<DIV>
		          <FONT FACE="Verdana" size="2"><xsl:value-of
select="POSTAL_CODE"/></FONT>
		        </DIV>
			<BR/>
		</xsl:if>
        </xsl:for-each>
    </BODY>
  </HTML>
</xsl:template>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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.