Presumably you have posted this on an XSLT forum because you are using XSLT, but you seem very confused. When you say "xml file" do you mean "XSLT stylesheet"? XSLT allows parameters to be passed using xsl:param, and it allows conditional instructions using xsl:if. You'll find information about these in any XSLT textbook.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference