[
Lists Home |
Date Index |
Thread Index
]
- From: Oliver Becker <obecker@informatik.hu-berlin.de>
- To: clhan@gintic.gov.sg
- Date: Tue, 22 Aug 2000 14:18:30 +0200 (MET DST)
> Does any one out there know how to check whether an element tag say
> <nameid> exist in the xml file using xsl stylesheet?
Just use xsl:if or xsl:choose with an XPath expression to the
element in question.
E.g.
<xsl:template match="/">
<xsl:choose>
<xsl:when test="//nameid">Yeah - the document contains a nameid</xsl:when>
<xsl:otherwise>Sorry, no nameid found</xsl:otherwise>
</xsl:choose>
</xsl:template>
(Directly typed into my mailer - no warranty for typos)
XSLT questions are better posted to xsl-list,
see http://www.mulberrytech.com/xsl/xsl-list
Cheers,
Oliver
/-------------------------------------------------------------------\
| ob|do Dipl.Inf. Oliver Becker |
| --+-- E-Mail: obecker@informatik.hu-berlin.de |
| op|qo WWW: http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/
|