This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Create a variable at run time withXMLDOM


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@script-source.com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]