Re: [xsl] check for existance of an element in the xml

Subject: Re: [xsl] check for existance of an element in the xml
From: Jake The Snake Briggs <jakbri@xxxxxxxxxxxxxx>
Date: Wed, 08 Dec 2004 12:15:34 +1300
Michael Kay wrote:

I only want that <script language="JavaScript" src="Shared/Javascript/validate.js"></script> part to appear once in the resulting html iff the xml i am processing has at least one <input..../> element.



Then write


<xsl:if test="//input">
 <script>
   ...
 </script>
</xsl:if>

Michael Kay
http://www.saxonica.com/



Excelent :) Thanks Michael and Marian, that worked a treat. What is the "//" notation called? What does it do?

Jake

Current Thread