The xsl:output element lets you specify how to generate result output. Although it is not required to specify the type of output but an XSLT processor outputs the result as specified the type in the method attribute of the output element.
The method attribute of xsl:output declares the type of output XSLT processor should generate as output of the result tree.
1. This attribute is optional.
2. It defines the output format.
3. If you don't specify xsl:output element then the default is XML. But if <html> is the first child of the root node with no preceding text nodes then HTML is the default value.
XSLT can be used to output plain text using the above line in xslt document.
XSLT can be used to output XML using the above line in xslt document. This is the default method.
XSLT can be used to output HTML using the above line in xslt document. It is the commonly used type of the result output. If there is html element as document element then the default method is changed from xml to html.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.