Thanks Christine, I was indeed using an older version of Xalan. After reviewing the FAQ and setting up my environment to use Xalan 2.6, the str:align() worked when left justifying text.
robert > -----Original Message----- > From: Christine Li [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 20, 2004 6:21 PM > To: Robert Taylor > Cc: [EMAIL PROTECTED] > Subject: Re: [EXSLT:align()] left justify doesn't seem to work > > > > > > > Hi, Robert > > I am using Sun JDK 1.4.2_04 and it distributes Xalan 2.4.1. May bugs have > been fixed in Xalan 2.6.0. Please check your environment and make sure > Xalan2.6 is used. Refer to > http://xml.apache.org/xalan-j/faq.html#faq-N100CC > > Christine Li > XSLT Development > IBM Toronto Lab > Tel: (905)413-2601 > Email: [EMAIL PROTECTED] > > "Robert Taylor" <[EMAIL PROTECTED]> wrote on 04/20/2004 03:37:49 PM: > > > Greetings, I'm trying to use the str:align() EXSLT function and it > > doesn't appear > > to work as expected when left justifying text in the field. > > > > For example: > > > > XML: > > <?xml version="1.0"?> > > <data>123456</data> > > > > > > XSL: > > <?xml version="1.0" ?> > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > xmlns:str="http://exslt.org/strings" > > extension-element-prefixes="str" > > version="1.0"> > > > > <xsl:template match="data"> > > <output> > > <xsl:text> > > </xsl:text> > > ----------- > > <xsl:value-of select="str:align(.,'-----------','left')"/> > > > > <xsl:text> > > </xsl:text> > > </output> > > </xsl:template> > > </xsl:stylesheet> > > > > > > The expected results would be: > > <?xml version="1.0" encoding="UTF-8"?> > > <output> > > > > ----------- > > 123456----- > > </output> > > > > But instead produces: > > <?xml version="1.0" encoding="UTF-8"?> > > <output> > > > > ----------- > > 123456------ > > </output> > > > > It appears to behave as expected when right or center justifying. > > > > I've tried this using Xalan version which comes with JDK1.4.2 > > and also with Xalan 2.6.0. > > > > Searching the archives with "str:align()" produced zero hits. > > Browsing the bug database I didn't find any open bugs regarding this > issue. > > > > Can anyone else confirm this? Am I doing something wrong? > > > > robert > > >
