Adolfo, I keep getting [java] javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of dir. Would I need a namespace URI tacked onto it? Actually, I tried that, but got same result.
--CB > -----Original Message----- > From: Lagomasino, Adolfo (Adolfo) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 2:27 PM > To: Brown, Charles; [email protected] > Subject: RE: Redirect:write mangles file names on windows > > > You may want to use the > Transformer.setParameter("dir", outputdir); > where the outputdir is the String specifying where you want > your output to be written. > > And then in the your stylesheet do something like > <redirect:write select=concat($dir, "sub/dir/[EMAIL PROTECTED]")> > > Adolfo > > > -----Original Message----- > From: Brown, Charles [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 10:48 AM > To: [email protected] > Subject: Redirect:write mangles file names on windows > > > > If I'm off topic, please let me know. > > I'm trying to get redirect:write to put a file in a > relative subdirectory, so I have the following > > <redirect:write file="sub/dir/[EMAIL PROTECTED]"> > > On linux, :write converts the relative file name into an > absolute file name, but it works fine, and the file ends up > where I want it. > > /home/cbrown/workspace/sub/dir/myFile.txt > > On windows, :write tries to convert the relative file name > into an absolute file name, but gets it mangled into; > > :C:\Documents and > Settings\CBROWN\workspace\sub\dir\sub\dir\myFile.txt > > Which has two problems. First, the initial colon (:) makes > the filename illegal, causing a FileNotFoundException to be > thrown. Second, the "sub\dir\" gets repeated, resulting in a > bad path. > > Any thoughts on avoiding this? > > Thanks. > > --CB >
