Subject: RE: [xsl] Problem using Muenchian method (apply-templates or key) with MSXML 3.0 & 4.0 From: "Saldate, DanielX" <danielx.saldate@xxxxxxxxx> Date: Mon, 20 May 2002 10:48:19 -0700 |
Good catch. I just figured this one out about the same time you did... The problem was that when IE sends an XML data island to a receiving object, it only sends the contents (everything within the <XML> tags, but not the tags themselves). I was using a copy of the output XML to debug which included the <XML> tags, so when I ran the transform previously, it always worked in the browser. So when my object looked at the input XML, the paths were different, and therefore the apply-templates and key functions would always fail. Thanks for your help! -Jeremy -----Original Message----- From: Kirk Allen Evans [mailto:kaevans@xxxxxxxxxxxxx] Sent: Monday, May 20, 2002 10:02 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Problem using Muenchian method (apply-templates or key) with MSXML 3.0 & 4.0 -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Saldate, DanielX Sent: Monday, May 20, 2002 11:36 AM To: XSL List (E-mail) Subject: [xsl] Problem using Muenchian method (apply-templates or key) with MSXML 3.0 & 4.0 > I've run into an interesting problem with MSXML 3.0 SP2 and 4.0 SP1. This > seems to be related to invoking either of these parsers from code, but I'm > not absolutely sure yet. > I have an XML data island embedded into a web page that looks somewhat like > the XML pasted below. Remove the XML node in your stylesheet's XPath statements. Using the following code, <html> <xml id="XMLData"> <foo> <bar>test</bar> </foo> </xml> <script language="javascript"> function myfunc() { var doc = new ActiveXObject("Microsoft.XMLHTTP"); xmlHTTP.Open ("POST", "MyPage.asp", false); xmlHTTP.Send (XMLData.xml); } </script> <body onload="javascript:myfunc()"> </body> </html> Only the elements "foo" and "bar" and the child text node are transmitted: the "xml" tag is a client-side identifier and is not part of the XML structure. So, the document node is being matched, giving you the HTML result in the root template match, but none of the other XML data can be matched because there is no "XML" node in the document. Kirk Allen Evans "XML and ASP.NET", New Riders Publishing Available at Amazon.com http://www.amazon.com/exec/obidos/ASIN/073571200X XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [ANN] Ipedo Web Express 3.0, Chris Parkerson | Thread | [xsl] XSL-List guidelines, B. Tommie Usdin |
RE: [xsl] How to do this in WD-XSL, Stuart Celarier | Date | Rephrasing the problem [was Re: [xs, Zack Brown |
Month |