/Tag: XSL

Read a Single XML File in Java

The following should complement the supplied article for reading XML files (DCRs) based on a directory.  This will read the contents of a singe file package com.littleforest.examples; import com.interwoven.livesite.dom4j.Dom4jUtils; import com.interwoven.livesite.external.ParameterHash; import com.interwoven.livesite.runtime.RequestContext; import com.interwoven.livesite.external.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.*; import org.dom4j.*; import java.util.Properties; /* Added for proxy use */ [...]

By |2017-11-30T10:42:09+01:00March 2nd, 2009|Articles, Java|0 Comments

XSL:Sort by Date, Organise by Type

In this example, we have a collection of material which we want to make available to users: whitepapers, articles, tips etc.  We want to group these by material and show the relevant subheading when this changes, but avoid redisplaying the heading if it remains the same, say: Whitepaper ... ... Article ... ... As per [...]

By |2009-03-02T13:29:07+01:00March 2nd, 2009|Articles, LiveSite, XSL|0 Comments

XSL:Sort By Date, Limit Returned Results

In an accompanying article, a simple method to sort by date was introduced. Normally it is desirable to limit the number of results shown. There are various complex ways of doing this posted on other sites, the fundamental problem being that <xsl:variable> works as a constant in practice, i.e set only once. Trying to implement [...]

By |2009-03-02T12:27:04+01:00March 2nd, 2009|Articles, XSL|0 Comments

XSL:Sort By Date

The following  should do the work This assumes the date is in the form dd/mm/yyyy: the seperators could be different as they are ignored anyway based on the substring. The important thing to realise here is that the <xsl:sort> functions do not do anything APART from sort, so there is nothing to see at this [...]

By |2009-03-02T12:06:03+01:00March 2nd, 2009|Articles, LiveSite, XSL|0 Comments