Subject: RE: [xsl] checck if external xml is valid with xsl/javascript? From: "bryan" <bry@xxxxxxxxxx> Date: Mon, 28 Jul 2003 12:40:29 +0200 |
Well if you don't need to handle xml over http for that you can just get have an extension function that does the typical load xml into dom, check if there is an error, if error return value1 if not error return value2, then check which it was before you go to document. If you do need to get xml over http you would do something like <msxsl:script language="JScript" implements-prefix="jsc"> function GetRest(xmldoc) { var async = false; var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0"); xmlhttp.Open("Get", xmldoc, async); xmlhttp.send(null); return xmlhttp.responseXML; } </msxsl:script> adding in appropriate error handling, with <xsl:template match="testxhttp"> <value><xsl:copy-of select="jsc:GetRest('your http url here')"/></value> </xsl:template> -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Armand Datema Sent: Monday, July 28, 2003 11:03 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] checck if external xml is valid with xsl/javascript? Hi Thanks for your reply We are using msxml4 Armand -----Original Message----- From: bryan [mailto:bry@xxxxxxxxxx] Sent: Monday, July 28, 2003 10:51 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] checck if external xml is valid with xsl/javascript? ><xsl:for-each select="document($vacature_url)//vacature"> >However, since this external xml is not in our control sometimes its not >valid and screws up the rest of the page. Unfortunately you would have to use an extension function for this, which processor are you using? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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 -> |
---|---|---|
RE: [xsl] checck if external xml is, Armand Datema | Thread | RE: [xsl] checck if external xml is, Jim Fuller |
[xsl] RE:, Jim Fuller | Date | [xsl] RE:, Rod Humphris - FLPTN |
Month |