Few days back I came across a requirement where I had to determine the name of a file given the absolute path. Had it been java or any other popular programming language I could just tokenize the path with the directory separator character ("/" or "") and taken the last token. However doing it in XSLT 1.0 was bit tricky. A recursive function (templates in case of XSLT 1.0 ) call was required."substring-after" function gives the part of the string after the first occurrence of a given delimiter.
And to call above code , we have to write the following fragment [sourcecode language="xml"] <xsl:call-template name="fileName"> <xsl:with-param name="path" select="D:codetest.txt"/> </xsl:call-template> [/sourcecode]
If XMLT 2.0 is available the above job is much easier using base-uri()
Full TV Schedule for the landing Tomorrow 10.30 AM IST, Curiosity is scheduled to land on Mars after the famous 7 minutes of terror. Looking forward to Pamela Gay and Fraser Cain hosting the Google+ hangout which will start at 8.30 AM IST. I hope everything goes right, not just because we will be able to do so many experiments in the SUV sized lab sent to mars but also because successful landing will increase the success ratio of mars landing.
Yesterday I visited Prof Ghanta Subbarao'sDhyanahita Schools. Apart of excellent teaching facility I saw so many Vegetable and fruit plants in the campus that it could feed all the children and staffs. There were huge solar panels providing power to the street lights and guest houses. Construction material were manufactured in the campus itself. There was a cowshed with cows and bio gas plant as well.