<xsl:if test="xpath-expression">...</xsl:if>
so for example
<xsl:if test="/html/body">body node exists</xsl:if>
<xsl:if test="not(/html/body)">body node missing</xsl:if>
More Related Contents:
- XSLT string replace
- how to escape single quote in xslt substring function
- Why do indexes in XPath start with 1 and not 0?
- XSLT getting last element
- How to use starts-with() , contains() and ends-with() in XPath to find the xml node innertext? in XPATH 1.0
- How to concat a string to xsl:value-of select=”…?
- Display an XML attribute value only on the first encounter with XSL
- XPath and XSLT 2.0 for .NET? [closed]
- XSLT 3-level grouping on attributes
- What are the differences between ‘call-template’ and ‘apply-templates’ in XSL?
- How can I convert a string to upper- or lower-case with XSLT?
- How to use XSLT to create distinct values
- XPath select all elements between two specific elements
- how to apply group by on xslt elements
- xslt 1.0 string replace function
- Can an XSLT insert the current date?
- Producing a new line in XSLT
- Is there an XSLT name-of element?
- XSLT concat string, remove last comma
- Replace special characters in XSLT
- How to execute XSLT 2.0 with ant?
- XSLT generate UUID
- What is the difference between ‘or’ and ‘|’ when programming in xslt?
- Multiply 2 numbers and then sum
- dynamic xpath in xslt?
- Adding element in middle of xml using xslt
- Create node set and pass as a parameter
- Inserting a line break in a PDF generated from XSL FO using
- Removing empty tags from XML via XSLT
- XSLT Bitwise Logic