Adjust XSL to handle multiple entries properly - strip out unwanted line breaks

I need to adjust the transform below so that it does NOT insert an unwanted line break as seen in this output example:


The problem can occur when there are multiple entries in the PDF-Full-Text-Link field and closing tags follow a line break (I think).

How should the transform be adjusted? Here's the code:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:xsi="" xmlns:inm="">
    <xsl:output omit-xml-declaration="no" indent="yes"/>
    <xsl:strip-space elements="*"/>
    <xsl:template match="node()|@*">
            <xsl:apply-templates select="node()|@*"/>
    <xsl:template match="inm:PDF-Full-Text-Link[normalize-space(.)]">
            <xsl:apply-templates select="@*"/>
            <xsl:value-of select="concat( '\\cas122\PDF\', .,'.pdf')"/>

Some sample input attached.
Who is Participating?
Geert BormansConnect With a Mentor Information ArchitectCommented:
try this instead

            <xsl:value-of select="concat( '\\cas122\PDF\', normalize-space(.),'.pdf')"/>

edit: tested with your example XML, it is the linebreak immedeatly following the value that is breaking your field up... normalize-space() is indeed the solution to that
GessWurkerAuthor Commented:
Thanks! All good!
Geert BormansInformation ArchitectCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.