I am using XSLT 1.0. There is a requirement of applying default values to all the XML elements which are blank using XSLT. For example, say below is the input XML:
<employee>
<id attributeName="attributeValue">1111</id>
<name attributeName="attributeValue" />
<address attributeName="attributeValue" />
</employee>
Here the value of XML elements name and address are blank. I need to fill those with default values so that the XML will look like the below:
<employee>
<id attributeName="attributeValue">1111</id>
<name attributeName="attributeValue">default</name>
<address attributeName="attributeValue">default</address>
</employee>
Can anyone please suggest me how to do this using XSLT 1.0? Sorry if the question is naive as I am not an expert in XSLT.