Altova Mailing List Archives
>microsoft.public.xsl Archive Home
>Thread Next - RE: Adding fixed whitespace to XSLT text output?
Adding fixed whitespace to XSLT text output?
Date: 3/9/2005 5:10:00 PM
Hi all, I'm a newbie to the XPATH/XSLT world, but I think there could be some real value in scaling this learning curve in order to allow my group to set up some source data that could be transformed in a variety of different ways without having to write a new program every time we want to build a new translation for the data. Unfortunately, as a newbie I'm having some trouble with my first transform, and digging around the books and web pages on XPATH/XSLT I've found so far haven't helped much I'm afraid. Here's the issue: I want to take an element from an XML form and turn the text of the element into a fixed-length string of, say, 20 characters. I know I can use the xsl:value-of element to get the text of the XML element I want, but I haven't had any luck finding out how to use XPATH to create the proper string expression to pad the results of the value-of operation with whitespace up to 20 characters. Can anyone help? Thanks in advance!