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

Subject: RE: [xsl] check for existance of an element in the xml
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 7 Dec 2004 09:36:17 -0000
> 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/

Current Thread