[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Puzzled by the XT and MSXML result.
Hi, 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 HTML 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" xmlns:xlink="http://ww.w3.org/TR/xlink" xmlns:xinclude="http://www.w3.org/1999/XML/xinclude"> <netfolder title="My Front page headlines"> <topic xlink:title="Technology headlines" xlink:type="extended"> <topic xlink:type="locator" xlink:title="Jim Barksdale to Donate $100 Million to Literacy" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/barksdale_2.html"> <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 programs.</description> </topic> <topic xlink:type="locator" xlink:title="CNET to Buy Comparison-Shopping Web Site Mysimon.com" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/mysimon_cnet_1.html" > <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 offerings.</description> </topic> <topic xlink:type="locator" xlink:title="internet.com: Midday Report" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/internetstocks_160.h tml"> <description>Mixed earnings and acquisitions were the order of the day for Internet stocks at midday Thursday as the sector continued to tread water.</description> </topic> <topic xlink:type="locator" xlink:title="Espanol.com Inks Deal With Telemundo" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/tech_espanol_1.html" > <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 promotion.</description> </topic> <topic xlink:type="locator" xlink:title="Omega to Merge With Olinetradinginc.com" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/tech_omega_1.html"> <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> <topic xlink:type="locator" xlink:title="Ego May Block Some Internet-Media Deals-CSFB Expert" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/mergers_csfb_1.html" > <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 Thursday.</description> </topic> <topic xlink:type="locator" xlink:title="RealNetworks Teams Up With BackWeb" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/realnetworks_backweb _1.html"> <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 Web.</description> </topic> <topic xlink:type="locator" xlink:title="CMGI Solidifies Ad Network" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/media_engage_3.htmll "> <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> <topic xlink:type="locator" xlink:title="NetTrends: Devices Add to Security Challenge" xlink:href="http://dailynews.yahoo.com/h/nm/20000119/wr/column_nettrends_57. html"> <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> <topic xlink:type="locator" xlink:title="Corrected: Ameritrade Losses Less Than Expected" xlink:href="http://dailynews.yahoo.com/h/nm/20000120/wr/ameritrade_earns_2.h tml"> <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> </topic> </topic> </netfolder> </document> XSLT document: ----------------------- <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://ww.w3.org/TR/xlink" version="1.0"> <xsl:output method="html" version="4.0" encoding="utf-16"/> <xsl:template match="/"> <html> <head> <title>topic map</title> <script language="javascript"> <xsl:comment> <![CDATA[ var remote = null; function rs(n,url,width,height,text) { remote = window.open(url, n, 'width=' + width + ',height=' + height +',resizable=yes,scrollbars=yes'); 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 != '') remote.document.write(text); } } ]]> </xsl:comment> </script> </head> <body bgcolor="#F0F0F0"> <xsl:apply-templates /> </body> </html> </xsl:template> <!-- the basic layout of the Portal document is a two column layout. Each netfolder 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 column. The left column contains comments about this test document. --> <xsl:template match="document"> <!-- title --> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" WIDTH="100%" > <TR> <TD BGCOLOR="#990033"> <b> <font size="+1" color="#ffffff" face="Arial">Nikita/Didier Labs Portal test page</font> </b> </TD> </TR> </TABLE> <br/> <!-- the basic two columns layout --> <table cellpadding="0" width="100%"> <!-- explainations about this test XML netfolder document --> <td valign="top"> <div align="center"> <center> <table border="0" cellpadding="10" cellspacing="0"> <tr> <td bgcolor="#FFFFFF" width="39%"> <font face="Arial"> <h4>Notes</h4> <p>This Document is rendered with an XSLT style sheet that transforms the XML document into DHTML. The XSLT source is located at:<a href="topic.xsl">topic.xsl</a><BR/> The XML document source is located at:<a href="topic.txt">topic.xml</a></p> <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 <xweb:query <br/> href="document('http://x.moreover.com/<br/> cgi-local/page?k=e-commerce&o=xml')/<br/> moreovernews"/><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 <moreovernews> element. Finally, the fragment is included in the XML document. The xweb interpreter replaces all <xweb:query...> 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' HEIGHT='260'>", "<TR><TD align='center'>To voice chat with others using Hearme'sVoiceCREATOR, ","you will need Internet Explorer 4.0 or above</TD></TR></TABLE>"); </SCRIPT> </div> </font> </td> </tr> </table> </center> </div> </td> <td width="1%"></td> <td valign="top" width="60%"> <xsl:apply-templates /> </td> </table> </xsl:template> <!-- 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%"> <tr> <td bgcolor="#cccccc"> <!-- widget title --> <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#990033"> <tr> <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> <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> <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"/> </a> <b><font size="3" color="#ffffff" face="Arial"><xsl:value-of select="@title"/></font></b> </td> </tr> </table> <!-- widget body --> <table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="FFFFFF"> <xsl:apply-templates/> </table> </td> </tr> </table> <!-- spacing between widgets --> <br/> </xsl:template> <xsl:template match="moreovernews"> <tr> <td colspan="3"> <ul> <xsl:apply-templates select="article"/> </ul> </td> </tr> </xsl:template> <xsl:template match="article"> <li> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="./url"/> </xsl:attribute> <xsl:value-of select="./headline_text"/> </xsl:element> </li> </xsl:template> <!-- A topic is displayed as an indented list of HTML hyperlinks --> <xsl:template match="topic[@xlink:type='extended']"> <tr> <td bgcolor="#dcdcdc" colspan="3"> <b><font face="Arial" size="-1"><xsl:value-of select="./@xlink:title"/></font></b> </td> </tr> <tr> <td colspan="3"> <ul> <xsl:apply-templates select="./topic" /> </ul> </td> </tr> </xsl:template> <xsl:template match="topic[@xlink:type='locator']"> <li> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="./@xlink:href"/> </xsl:attribute> <xsl:value-of select="./@xlink:title"/> </xsl:element> </li> </xsl:template> <xsl:template match="*|@*|text()"> <!-- In this template, We simply copy the content of the document's tree into the result output without doing any transformation --> <xsl:copy> <xsl:apply-templates select="*|@*|text()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 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
|
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
|