XML XSLT Namespace gotcha


Before couple of weeks back we spent a good amount of time making XML and XSLT work, you must be thinking so easy then why this guy invested lot of time. Wait o minute coming to you.


Basically, we had XML and we were trying to fetch few nodes via XSLT from it. But it was not working as expected. We verified everything our XPATH was correct and everything was correct then following link, pointed us towards a solution:
Our XML was having xmlns deceleration,  and we were not using xmlns in our XSLT document. And that was the reason why XSLT was not able to XPATH nodes. Once, we added XMLNS to our XSLT document and changed our XPATH as per XMLNS then everything started working as expected!