Java

Getting current date and time in XSLT 1.0

With XSLT 2.0, a method is provided, which quite simply determines the current date or time.

<xsl:value-of  select="current-dateTime()"/>

Unfortunately, this is not possible with XSLT 1.0, but there is the option to realize this using Java or JavaScript resources within the stylesheet. Here is an example, using Java, that works with Xalan and is default available in the ORACLE JRE.

Readmore…

Tagged , ,

XHTML validation against DTD schema in Java

Recently I had the problem of validating XHTML file using DTD schema and Java. As for DTD validation to find little on the Internet, I would like to explain briefly how this is possible by simply using Java resources.

Readmore…

Tagged , , ,

Convert objects into XMLGregorianCalendar

The following examples show, how a date, calendar or formatted String can be converted into XMLGregorianCalendar object.
Readmore…

Tagged ,

Sorting files in Java

In some circumstance it is neccessary to get a sorted List of files from folder. Therefore the Java API provides some functions to access the local file system. The following snippets will demonstrate how the identified files can be sorted useful:
Readmore…

Tagged ,