Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML and XSL through MSXML

Thread Tools

XML and XSL through MSXML

Posts: n/a
I have a webpage where I'm opening an XML page with MSXML, pushing it
through an XSL file to generate some HTML which is incorporated into
the body of the main HTML page. I have other pages where this all
works great. One page, however, seems to bypass the a for-each
iteration, and I can't understand why. I've used XMLSpy to validate
the XML and XSL, and as far as I can see, the simulated generation
through XMLSpy is correct.

Here is a sample of my XML, XSL.
<?xml version="1.0" standalone="no" ?>
<action type="get_stats">
<swbf stattype="summary">
<mapname map="map1">Unknown</mapname>
<players numplayers="2">
<member kills="1" deaths="2">Bob</member>
<member kills="1" deaths="2">Tim</member>
<![CDATA[ <a
href="swbf_details.asp?host=">De tails</a>

<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet xmlnssl=""
<xslutput method="html" />

<xsl:template match="/WCP/action/swbf">
<xsl:if test="@stattype='summary'">
<xsl:value-of select="hostname" />:<xsl:value-of select="port"
/><br />
<xsl:when test="players/@numplayers = 0">
No players currently in the game
<xsl:for-each select="players/member">
<xsl:value-of select="text()" /> -
<xsl:value-of select="@team" /> -
<xsl:value-of select="@kills" /> -
<xsl:value-of select="@deaths" /><br />

When the above XML is pushed through the XSL stylesheet with MSXML,
only the host name will show up. But when run through XMLSpy, the
hostname and all the players show up.

Any ideas? Thanks!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default MSXML XSL Stylesheet for IE7? Candle XML 2 04-06-2009 08:29 PM
XML call XSL that calls xml through document() element hagar Java 1 10-19-2006 09:56 PM
XSL Question tp xsl:for-each and xsl:variable XML 1 05-27-2005 09:25 PM
xml validation using msxml and schema XML 2 01-04-2005 09:38 AM
What parses the xml/xsl transform in System.xml NOT msxml? KathyB ASP .Net 0 06-25-2003 05:03 PM