xsl-list
[Top] [All Lists]

Re: check for existance of an element in the xml

2004-12-07 16:15:34
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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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

Jake

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--