[izpack-users] No backslashification in XML files?
Andrew Warinner
awarinner at gmail.com
Wed Nov 15 17:01:26 CET 2006
I've noticed that when doing variable substitution in XML IzPack does
not backslashify the values. This is causing me grief with Windows
pathnames.
For example I install a log4j.xml file like this:
<file src="lib/log4j.xml" targetdir="$INSTALL_PATH/lib"/>
<parsable type="xml" targetfile="${INSTALL_PATH}/lib/log4j.xml"/>
log4j.xml contains:
<appender name="LogFileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${INSTALL_PATH}${FILE_SEPARATOR}doQ.log" />
<param name="Append" value="true"/>
<param name="MaxFileSize" value="1MB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %t %-5p
*%c{1}* - %m%n" />
</layout>
</appender>
When installing under Windows with INSTALL_PATH=C:\Documents and
Settings\awarinner\doQ-1.7, the above comes out as:
<appender name="LogFileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="C:\Documents and
Settings\awarinner\doQ-1.7\doQ.log" />
<param name="Append" value="true"/>
<param name="MaxFileSize" value="1MB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %t %-5p
*%c{1}* - %m%n" />
</layout>
</appender>
But this causes log4j to choke, what I really want is INSTALL_PATH to
be substituted like this:
<param name="File" value="C:\\Documents and
Settings\\awarinner\\doQ-1.7\\doQ.log" />
so log4j will understand the backslash path and everything will be copacetic.
Am I misunderstanding the effect of setting parsable type="xml" or
does variable substitution not work with XML?
Puzzled,
Andrew Warinner
More information about the izpack-users
mailing list