The past couple of days I've working with the text.components.xsl in DLXS for the city directories that are part of Unreal City (STL fire insurance maps). We had this problem with the display where it would read the information in each line <L> and then dump it as one string of characters without spaces. Imagine a phone book where the names, addresses and phone numbers are pushed together.
DLXS displays collections using xslt. There is an xsl at a class level, sort of like a master template that works in most cases. However, you can modify the xsl at the collection level and it overrides the master template. I created a stylesheet that imported the master stylesheet and then worked out the spacing problem with the lines. This was a little harder than it sounds because the lines aren't laid out in the same manner. The stylesheet had to be flexible enough to process elements correctly when faced with these different arrangements.
Using different conditionals the xsl tests "when" and "if" certain conditions exist. If they they do then it proceeds through a set of steps. When none of the conditions are met it moves on to another set of commands to process the elements.
An example is:
<xsl:choose>
<xsl:when test="condition1"> <!--- Do these processes ---> </when>
<xsl:when test="condition2"> <!--- Do these other processes ---> </when>
<xsl:otherwise> <!--- Do this different set of processes ---> </xsl:otherwise>
</xsl:choose>
I felt this was a big step because it was the first time we've modified a stylesheet in DLXS to work with a specific collection.