[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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@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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|