Puzzled by the XT and MSXML result.

Subject: Puzzled by the XT and MSXML result.
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Tue, 2 May 2000 12:31:06 -0400

I executed the same XSLT style sheet with first XT and then with msxml3. I
got two different results. I think that thee XSLT style sheet is compliant
to the recommendation (but I am no sure anymore) but when I run it with XT
(packaged as a win32 executable) I get a strange result. I am completely
puzzled. Did I make a mistake in the style and cannot see it or is there
something else I am missing?

here are the XSLT style sheet and the XML document to be transformed into

XML document:
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="topic.xsl"?>

<document xmlns="http://www.netfolder.com/2000/netfolder";

   <netfolder title="My Front page headlines">

	<topic  xlink:title="Technology headlines"
		<topic xlink:type="locator"
			xlink:title="Jim Barksdale to Donate $100 Million to Literacy"

			<description>Jim Barksdale, the Silicon Valley venture capitalist who
previously headed Netscape Communications Corp., is set to make a $100
million donation to the state of Mississippi to use for reading and literacy
		<topic xlink:type="locator"
			xlink:title="CNET to Buy Comparison-Shopping Web Site Mysimon.com"

			<description>Online media network CNET Inc. said Thursday it will acquire
the closely held online comparison shopping firm mySimon.com Inc. for about
$700 million in stock to boost its electronic-commerce
		<topic xlink:type="locator"
			xlink:title="internet.com: Midday Report"

			<description>Mixed earnings and acquisitions were the order of the day
for Internet stocks at midday Thursday as the sector continued to tread
		<topic xlink:type="locator"
			xlink:title="Espanol.com Inks Deal With Telemundo"

			<description>Spanish-language online retail pioneer Espanol.com said on
Thursday it will give television programmer Telemundo Network a minority
equity stake in exchange for $3 million worth of advertising and
		<topic xlink:type="locator"
			xlink:title="Omega to Merge With Olinetradinginc.com"

			<description>Omega Research Inc. , which provides online analytical
financial tools, and Internet broker OnlineTradinginc.com Corp. said on
Thursday they agreed to merge in a $300 million stock deal to create a full
service platform for online traders.</description>
		<topic xlink:type="locator"
			xlink:title="Ego May Block Some Internet-Media Deals-CSFB Expert"

			<description>More e-commerce and ``traditional'' media firms are likely
to follow the merger trail blazed by America Online Inc and Time Warner Inc,
but ego could stand in the way of some possible hook-ups, Credit Suisse
First Boston's chief U.S. investment strategist said on
		<topic xlink:type="locator"
			xlink:title="RealNetworks Teams Up With BackWeb"

			<description>Internet media software company RealNetworks Inc. said on
Thursday it was partnering with BackWeb Technologies Ltd. , a maker of
so-called ''push'' technology, to send music to computers over the
		<topic xlink:type="locator"
			xlink:title="CMGI Solidifies Ad Network"

			<description>In a move to align Internet advertising businesses
controlled by CMGI Inc. , Engage Technologies Inc. will buy Adsmart and
Flycast Communications Corp. in a stock deal worth about $2.6 billion, the
companies said on Thursday.</description>
		<topic xlink:type="locator"
			xlink:title="NetTrends: Devices Add to Security Challenge"

			<description>Consumers handed an estimated $30 billion over to Internet
sites last year, a sign that a lot of people have lost their fears about
shopping online.</description>
		<topic xlink:type="locator"
			xlink:title="Corrected: Ameritrade Losses Less Than Expected"

			<description>Ameritrade Holding Corp. , the No. 6 U.S. Internet
brokerage, on Wednesday posted a smaller-than-expected loss for the fiscal
first quarter and revenues more than doubled, boosted by a successful
advertising campaign.</description>

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

<xsl:output method="html"

<xsl:template match="/">
			<title>topic map</title>
			<script language="javascript">

			var remote = null;

			function rs(n,url,width,height,text)
				remote = window.open(url, n, 'width=' + width + ',height=' + height
				if (remote != null)
					if (remote.opener == null)
						remote.opener = self;
					window.name = 'myYahooRoot';
					if (url == "self")
						remote.location.href = self.location;
					else if (url != "local")
						remote.location.href = url;
					if (text != '')

		<body bgcolor="#F0F0F0">
			<xsl:apply-templates />

the basic layout of the Portal document is a two column layout. Each
can be laid out in either the left column or the right column.
In this sample, we chouse to insert the netfolder widget in the right
The left column contains comments about this test document.
<xsl:template match="document">
	<!-- title -->
			<TD BGCOLOR="#990033">
				<font size="+1" color="#ffffff" face="Arial">Nikita/Didier Labs Portal
test page</font>
	<!-- the basic two columns layout -->
	<table cellpadding="0" width="100%">

	  <!-- explainations about this test XML netfolder document -->
	  <td valign="top">
	  <div align="center">
	    <table border="0" cellpadding="10" cellspacing="0">
	        <td bgcolor="#FFFFFF" width="39%">
	          <font face="Arial">
	          <p>This Document is rendered with an XSLT style sheet that
transforms the
	          XML document into DHTML. The XSLT source is located at:<a
		    The XML document source is located at:<a
	          <h4>What's happening on the XML server?</h4>
		    <p>The xml server dynamically aggregate contents provided by XML web
services. If needed, it then transforms
                	 the dynamically created XML document into a rendition
format using either XSLT or DSSSL</p>
		    <h5>Step 1:</h5>
		    <p>The moreover.com section is dynamically created with an xweb:query
such as &lt;xweb:query <br/>
                   The "href" attribute is an XPath expression.<br/>
			 The first part of the XPAth expression is used to send a request to the
Moreover server. The
			 request is simply a URL query. Then, the server replies with an XML
document. The second part of the XPath
                   expression select a fragment from the XML document. The
fragment root element is set to the &lt;moreovernews&gt; element.
                   Finally, the fragment is included in the XML document.
The xweb interpreter replaces all &lt;xweb:query...&gt; element by XML
fragments received from
                   queries to XML web services.<br/>
			 The delay you are experimenting when requesting the XML document from
the XML server is caused by
		       response time of all XML web services queried during the XML
document fragments aggregation.</p>
		    <h5>Step 2:</h5>
		    <p>if the user agent does not support XML browsing, then the XML
document is transformed on the server side
            	 and sent to the user agent in a format that the user agent can
interpret (ex: DHTML, XHTML, WML, SMIL, VoiceML, SVG, etc...)</p>
		    <h4>Talk to the developers</h4>
	          <p>If you need more explainations, The small window displayed
below is a voice enabled control.
			 If Nikita or Didier are on-line, feel free to ask them questions about
this portal experiment.</p>
		    <div align="center">
			<!--(c) HearMe, 1999. Freely reproducible subject to
VoiceCreator(tm)agreement at www.hearme.com -->
			<SCRIPT SRC="http://vp.hearme.com/products/vp/embedded/scripts/vc.js";>
			document.writeln("<TABLE BORDER='1' CELLPADDING='5' WIDTH='130'
			"<TR><TD align='center'>To voice chat with others using
Hearme'sVoiceCREATOR, ","you will need Internet Explorer 4.0 or
  	  <td width="1%"></td>
	  <td valign="top" width="60%">
	  	<xsl:apply-templates />

This template creates a table for each netfolder element.
The netfolder element is transformed into a rendition
object that ressemble Yahoo's portal widgets.
A portal widget allows you to:
a) display the netfolder in a new window
b) edit the content of a netfolder
c) remove the netfolder from the portal page
<xsl:template match="netfolder">
	<!-- widget area -->
	<table order="0" cellpadding="1" cellspacing="0" width="100%">
		<td bgcolor="#cccccc">
			<!-- widget title -->
			<table border="0" cellpadding="0" cellspacing="0" width="100%"
				<td colspan="3" width="100%">
				<a href="javascript:rs('p1','local',300,400,'This button removes this
netfolder from the portal page')">
					<img align="right" border="0" height="15" width="18"
src="http://us.yimg.com/i/my/x.gif"; alt="Remove"/>
				<a href="javascript:rs('p1','local',300,400,'This button edits the
netfolder content')">
					<img align="right" border="0" height="15" width="28"
src="http://us.yimg.com/i/my/edit2.gif"; alt="edit"/>
				<a href="javascript:rs('p1','self',300,400,'')">
					<img align="right" src="http://us.yimg.com/i/my/detach.gif"; border="0"
height="15" width="18" alt="Detach"/>
				<b><font size="3" color="#ffffff" face="Arial"><xsl:value-of
			<!-- widget body -->
			<table border="0" cellspacing="0" cellpadding="3" width="100%"
	<!-- spacing between widgets -->

<xsl:template match="moreovernews">
		<td colspan="3">
				<xsl:apply-templates select="article"/>

<xsl:template match="article">
		<xsl:element name="a">
			<xsl:attribute name="href">
				<xsl:value-of select="./url"/>
			<xsl:value-of select="./headline_text"/>

A topic is displayed as an indented list of HTML hyperlinks
<xsl:template match="topic[@xlink:type='extended']">
	<td bgcolor="#dcdcdc" colspan="3">
	<b><font face="Arial" size="-1"><xsl:value-of
		<td colspan="3">
				<xsl:apply-templates select="./topic" />

<xsl:template match="topic[@xlink:type='locator']">
		<xsl:element name="a">
		<xsl:attribute name="href">
			<xsl:value-of select="./@xlink:href"/>
		<xsl:value-of select="./@xlink:title"/>

<xsl:template match="*|@*|text()">
<!-- 	In this template, We simply copy the
 	content of the document's tree into
	the result output without doing any
		<xsl:apply-templates select="*|@*|text()"/>


Didier PH Martin
Email: martind@xxxxxxxxxxxxx
Conferences: XML Europe (http://www.gca.org)
Book: XML Professional (http://www.wrox.com)
column: Style Matters (http://www.xml.com)
Products: http://www.netfolder.com

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

Current Thread