xsl-list
[Top] [All Lists]

transform a string

2004-11-26 18:15:09
hello,

within a xsl template I need to transform a physical path like
file:///D:/usr/jan/My Documents/Visual Studio
Projects/Web/Data/XmlContent/Development/TaskSheet.xml
to 
/Development/Tasksheet.aspx

I tried
<xsl:param name="baseDir" select="'file:///D:/usr/jan/My
Documents/Visual Studio Projects/Web/Data/XmlContent/'"/>

        <xsl:template match="site:document">
                <site:document>
                        <site:xml-file>
                                <xsl:value-of select="site:xml-file"/>
                        </site:xml-file>
                        <site:link>
                                <xsl:value-of 
select="translate(string(site:xml-file), $baseDir, '')"/>
                        </site:link>
                </site:document>
        </xsl:template>

but keep getting strange, scrambled results...

thanks for the help

-- 
Jan
http://www.limpens.com

Otakoo Saloon Cartoon - newest episode at http://limpens.com/oscredirect

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>