<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>ajaxmin Wiki Rss Feed</title><link>http://ajaxmin.codeplex.com/</link><description>ajaxmin Wiki Rss Description</description><item><title>Updated Wiki: EncoderFallbacks</title><link>https://ajaxmin.codeplex.com/wikipage?title=EncoderFallbacks&amp;version=5</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Writing Files with the Encoder Fallbacks&lt;/h1&gt;
&lt;p&gt;If you are using the DLL version of the Microsoft Ajax Minifier, you might have noticed that it does not include
&lt;em&gt;any&lt;/em&gt; file input or output functionality. The DLL only works with in-memory strings. Your application will have to handle reading from or writing to the hard drive. You don’t really need to do anything special to read JavaScript or CSS files. Simply
 use the .NET StreamReader class (System.IO namespace) or any other existing file-reading methodology, although you may have to provide the appropriate Encoding object if it’s not readily determined by the file content itself.
&lt;em&gt;Writing&lt;/em&gt; files, however may or may not be a little more complicated. If your JavaScript doesn’t contain anything outside of the normal ASCII range, then you don’t really need to do anything special. Or if you are writing files in the UTF-8 or UTF-16
 character encodings, you also don’t really need to do anything special. The complication arises if you want to write in a
&lt;em&gt;different&lt;/em&gt; encoding, and if your code contains characters that can’t be represented in that encoding.&lt;/p&gt;
&lt;p&gt;Take, for example, this JavaScript snippet:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;It’s simple, but it contains &lt;a href="http://unicode.org/" target="_blank"&gt;UNICODE&lt;/a&gt; Chinese characters. The string representation of this code is twelve characters long, and the code points are:&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="700" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="58"&gt;0061&lt;/td&gt;
&lt;td valign="top" width="58"&gt;006c&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0065&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0072&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0074&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0028&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0022&lt;/td&gt;
&lt;td valign="top" width="58"&gt;4f60&lt;/td&gt;
&lt;td valign="top" width="58"&gt;597d&lt;/td&gt;
&lt;td valign="top" width="58"&gt;ff01&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0022&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0029&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you write an overly-simple block of code to utilize the StreamWriter class to write this string (in the minifiedCode variable) like so, you will create a file encoded as UTF-8 (the default encoding for StreamWriter):&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;If you open the file up in a binary editor, you will see the characters have been written in eighteen bytes:&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="700" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="58"&gt;61&lt;/td&gt;
&lt;td valign="top" width="58"&gt;6c&lt;/td&gt;
&lt;td valign="top" width="58"&gt;65&lt;/td&gt;
&lt;td valign="top" width="58"&gt;72&lt;/td&gt;
&lt;td valign="top" width="58"&gt;74&lt;/td&gt;
&lt;td valign="top" width="58"&gt;28&lt;/td&gt;
&lt;td valign="top" width="58"&gt;22&lt;/td&gt;
&lt;td valign="top" width="58"&gt;e4 bd a0&lt;/td&gt;
&lt;td valign="top" width="58"&gt;e5 a5 bd&lt;/td&gt;
&lt;td valign="top" width="58"&gt;ef bc 81&lt;/td&gt;
&lt;td valign="top" width="58"&gt;22&lt;/td&gt;
&lt;td valign="top" width="58"&gt;29&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The Chinese characters have each been encoded into three-byte &lt;a href="http://en.wikipedia.org/wiki/Utf-8" target="_blank"&gt;
UTF-8&lt;/a&gt; sequences. The beauty of this is that UTF-8 can represent any character in the UNICODE character set, which is essentially every character you will really want to use on a computer. Nothing special needs to be done with this file, because browsers
 and any other tools that might want to read it back (like AjaxMin) will correctly read and decode the UTF-8 characters. Loading this file up in Internet Explorer, for example, will get you the original text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;That’s all fine and dandy, but what if you want to save your files in another text encoding, say, ASCII or Big-5? Well, let’s assume we want to write this JavaScript code as an ASCII file. Obviously the ASCII character set does not include the Chinese characters
 in our code snippet. If we do the &lt;em&gt;wrong&lt;/em&gt; thing, and simply pass in the default ASCII encoder to the StreamWriter constructor, you will lose your Chinese characters:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;That code produces a file with twelve bytes, and the three Chinese characters will all be changed into question-marks (0x3F). Probably not what you want.&amp;nbsp; To handle characters outside the encoding scheme, you need to use an
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encoderfallback" target="_blank"&gt;
&lt;strong&gt;EncoderFallback&lt;/strong&gt;&lt;/a&gt; class. To make a long story short, an Encoder Fallback is called whenever a text encoding object is asked to write a character that isn’t in the destination encoding. The default fallback is to simply write a question mark
 (hence the lost Chinese characters). Microsoft Ajax Minifier provides two Encoder Fallback classes for use in your code:
&lt;strong&gt;JSEncoderFallback&lt;/strong&gt; for JavaScript and &lt;strong&gt;CssEncoderFallback&lt;/strong&gt; for CSS. All they do is take the character that cannot be displayed in whatever output encoding you are using, and escape it as appropriate for the particular language.
 For instance, characters in JavaScript are encoded with the UNICODE escape sequence:
&lt;span style="font-family:courier new"&gt;\uXXXX&lt;/span&gt; if the character is in the standard 16-bit UNICODE range, and as the
&lt;a href="http://en.wikipedia.org/wiki/Surrogate_pair" target="_blank"&gt;surrogate pair&lt;/a&gt;
&lt;span style="font-family:courier new"&gt;\uUUUU\uLLLL&lt;/span&gt; if the character is in the extended UNICODE range (all digits in hexadecimal). For CSS code, the escape sequence is
&lt;span style="font-family:courier new"&gt;\XXXXXX&lt;/span&gt;, consisting of up to six hexadecimal digits; if less than six digits are needed, a space character is appended to signify the end of the escape sequence.&lt;/p&gt;
&lt;p&gt;Now, back to our example. If we want to write the file in the ASCII encoding, we need to clone the default ASCII encoding object and set the EncoderFallback property to an instance of our JSEncodeFallback class. We have to clone the default ASCII encoder
 because it will throw an exception if you try to set the EncoderFallback property on the default ASCII encoder object proper.&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = (&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;)&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII.Clone();
encoding.EncoderFallback = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;JSEncoderFallback&lt;/span&gt;();
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;Now when we write our sample code, we will get the following ASCII text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;\u4f60\u597d\uff01&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;Loading that code in a browser that executes the code will get you the desired alert box:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279301"&gt;&lt;img title="image" border="0" alt="image" src="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279302" width="190" height="177" style="border-left-width:0px; border-right-width:0px; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; display:inline; padding-right:0px; border-top-width:0px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are only a handful of default encoders that you can clone. If you want to encode your output in a
&lt;em&gt;different&lt;/em&gt; encoding, then I would suggest using the Encoding.GetEncoding method, passing in the name of the desired encoding:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.GetEncoding(
    &lt;span style="color:#a31515"&gt;&amp;quot;iso-8859-1&amp;quot;&lt;/span&gt;,
    JSEncoderFallback(),
    &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;DecoderReplacementFallback&lt;/span&gt;(&lt;span style="color:#a31515"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;));
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;The encoding names you can use are defined in the Info.Name column of the data table on
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encodinginfo.name.aspx" target="_blank"&gt;
this MSDN page&lt;/a&gt;. For example, if you want to encode your output in the Big-5 encoding scheme, pass “big5” to the GetEncoding method.&lt;/p&gt;
&lt;p&gt;Generally speaking it’s always a good idea to use an encoding object with the appropriate AjaxMin-provided EncoderFalback object whenever writing JS or CSS code, regardless of what encoding scheme you are using or whether or not your code contains special
 characters. Using the provided EncoderFallback objects will always generate the proper JavaScript or CSS code.&lt;/p&gt;
&lt;h1&gt;What If I Just Want A JS-Encoded Encoded String?&lt;/h1&gt;
&lt;p&gt;That is also easily handled, but it will take a little more work. What we need to do is write the minified code (internally stored by .NET as a UNICODE string) to an array of ASCII-encoded bytes using an instance of JSFallbackEncoder, and then read those
 bytes back into a .NET string using a StreamReader. For instance, you could define a function like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; &lt;strong&gt;GetAsciiEncodedOutput&lt;/strong&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; minified)
{
    var encoder = (Encoding)Encoding.ASCII.Clone();
    encoder.EncoderFallback = &lt;span class="kwrd"&gt;new&lt;/span&gt; Microsoft.Ajax.Utilities.JSEncoderFallback();
    var encodedBytes = encoder.GetBytes(minified);

    &lt;span class="kwrd"&gt;using&lt;/span&gt; (var memoryStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream(encodedBytes))
    {
        &lt;span class="kwrd"&gt;using&lt;/span&gt; (var reader = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(memoryStream))
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; reader.ReadToEnd();
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Sat, 18 May 2013 01:04:30 GMT</pubDate><guid isPermaLink="false">Updated Wiki: EncoderFallbacks 20130518010430A</guid></item><item><title>Updated Wiki: EncoderFallbacks</title><link>https://ajaxmin.codeplex.com/wikipage?title=EncoderFallbacks&amp;version=4</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Writing Files with the Encoder Fallbacks&lt;/h1&gt;
&lt;p&gt;If you are using the DLL version of the Microsoft Ajax Minifier, you might have noticed that it does not include
&lt;em&gt;any&lt;/em&gt; file input or output functionality. The DLL only works with in-memory strings. Your application will have to handle reading from or writing to the hard drive. You don’t really need to do anything special to read JavaScript or CSS files. Simply
 use the .NET StreamReader class (System.IO namespace) or any other existing file-reading methodology, although you may have to provide the appropriate Encoding object if it’s not readily determined by the file content itself.
&lt;em&gt;Writing&lt;/em&gt; files, however may or may not be a little more complicated. If your JavaScript doesn’t contain anything outside of the normal ASCII range, then you don’t really need to do anything special. Or if you are writing files in the UTF-8 or UTF-16
 character encodings, you also don’t really need to do anything special. The complication arises if you want to write in a
&lt;em&gt;different&lt;/em&gt; encoding, and if your code contains characters that can’t be represented in that encoding.&lt;/p&gt;
&lt;p&gt;Take, for example, this JavaScript snippet:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;It’s simple, but it contains &lt;a href="http://unicode.org/" target="_blank"&gt;UNICODE&lt;/a&gt; Chinese characters. The string representation of this code is twelve characters long, and the code points are:&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="700" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="58"&gt;0061&lt;/td&gt;
&lt;td valign="top" width="58"&gt;006c&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0065&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0072&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0074&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0028&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0022&lt;/td&gt;
&lt;td valign="top" width="58"&gt;4f60&lt;/td&gt;
&lt;td valign="top" width="58"&gt;597d&lt;/td&gt;
&lt;td valign="top" width="58"&gt;ff01&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0022&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0029&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you write an overly-simple block of code to utilize the StreamWriter class to write this string (in the minifiedCode variable) like so, you will create a file encoded as UTF-8 (the default encoding for StreamWriter):&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;If you open the file up in a binary editor, you will see the characters have been written in eighteen bytes:&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="700" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="58"&gt;61&lt;/td&gt;
&lt;td valign="top" width="58"&gt;6c&lt;/td&gt;
&lt;td valign="top" width="58"&gt;65&lt;/td&gt;
&lt;td valign="top" width="58"&gt;72&lt;/td&gt;
&lt;td valign="top" width="58"&gt;74&lt;/td&gt;
&lt;td valign="top" width="58"&gt;28&lt;/td&gt;
&lt;td valign="top" width="58"&gt;22&lt;/td&gt;
&lt;td valign="top" width="58"&gt;e4 bd a0&lt;/td&gt;
&lt;td valign="top" width="58"&gt;e5 a5 bd&lt;/td&gt;
&lt;td valign="top" width="58"&gt;ef bc 81&lt;/td&gt;
&lt;td valign="top" width="58"&gt;22&lt;/td&gt;
&lt;td valign="top" width="58"&gt;29&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The Chinese characters have each been encoded into three-byte &lt;a href="http://en.wikipedia.org/wiki/Utf-8" target="_blank"&gt;
UTF-8&lt;/a&gt; sequences. The beauty of this is that UTF-8 can represent any character in the UNICODE character set, which is essentially every character you will really want to use on a computer. Nothing special needs to be done with this file, because browsers
 and any other tools that might want to read it back (like AjaxMin) will correctly read and decode the UTF-8 characters. Loading this file up in Internet Explorer, for example, will get you the original text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;That’s all fine and dandy, but what if you want to save your files in another text encoding, say, ASCII or Big-5? Well, let’s assume we want to write this JavaScript code as an ASCII file. Obviously the ASCII character set does not include the Chinese characters
 in our code snippet. If we do the &lt;em&gt;wrong&lt;/em&gt; thing, and simply pass in the default ASCII encoder to the StreamWriter constructor, you will lose your Chinese characters:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;That code produces a file with twelve bytes, and the three Chinese characters will all be changed into question-marks (0x3F). Probably not what you want.&amp;nbsp; To handle characters outside the encoding scheme, you need to use an
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encoderfallback" target="_blank"&gt;
&lt;strong&gt;EncoderFallback&lt;/strong&gt;&lt;/a&gt; class. To make a long story short, an Encoder Fallback is called whenever a text encoding object is asked to write a character that isn’t in the destination encoding. The default fallback is to simply write a question mark
 (hence the lost Chinese characters). Microsoft Ajax Minifier provides two Encoder Fallback classes for use in your code:
&lt;strong&gt;JSEncoderFallback&lt;/strong&gt; for JavaScript and &lt;strong&gt;CssEncoderFallback&lt;/strong&gt; for CSS. All they do is take the character that cannot be displayed in whatever output encoding you are using, and escape it as appropriate for the particular language.
 For instance, characters in JavaScript are encoded with the UNICODE escape sequence:
&lt;span style="font-family:courier new"&gt;\uXXXX&lt;/span&gt; if the character is in the standard 16-bit UNICODE range, and as the
&lt;a href="http://en.wikipedia.org/wiki/Surrogate_pair" target="_blank"&gt;surrogate pair&lt;/a&gt;
&lt;span style="font-family:courier new"&gt;\uUUUU\uLLLL&lt;/span&gt; if the character is in the extended UNICODE range (all digits in hexadecimal). For CSS code, the escape sequence is
&lt;span style="font-family:courier new"&gt;\XXXXXX&lt;/span&gt;, consisting of up to six hexadecimal digits; if less than six digits are needed, a space character is appended to signify the end of the escape sequence.&lt;/p&gt;
&lt;p&gt;Now, back to our example. If we want to write the file in the ASCII encoding, we need to clone the default ASCII encoding object and set the EncoderFallback property to an instance of our JSEncodeFallback class. We have to clone the default ASCII encoder
 because it will throw an exception if you try to set the EncoderFallback property on the default ASCII encoder object proper.&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = (&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;)&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII.Clone();
encoding.EncoderFallback = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;JSEncoderFallback&lt;/span&gt;();
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;Now when we write our sample code, we will get the following ASCII text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;\u4f60\u597d\uff01&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;Loading that code in a browser that executes the code will get you the desired alert box:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279301"&gt;&lt;img title="image" border="0" alt="image" src="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279302" width="190" height="177" style="border-left-width:0px; border-right-width:0px; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; display:inline; padding-right:0px; border-top-width:0px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are only a handful of default encoders that you can clone. If you want to encode your output in a
&lt;em&gt;different&lt;/em&gt; encoding, then I would suggest using the Encoding.GetEncoding method, passing in the name of the desired encoding:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.GetEncoding(
    &lt;span style="color:#a31515"&gt;&amp;quot;iso-8859-1&amp;quot;&lt;/span&gt;,
    JSEncoderFallback(),
    &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;DecoderReplacementFallback&lt;/span&gt;(&lt;span style="color:#a31515"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;));
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;The encoding names you can use are defined in the Info.Name column of the data table on
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encodinginfo.name.aspx" target="_blank"&gt;
this MSDN page&lt;/a&gt;. For example, if you want to encode your output in the Big-5 encoding scheme, pass “big5” to the GetEncoding method.&lt;/p&gt;
&lt;p&gt;Generally speaking it’s always a good idea to use an encoding object with the appropriate AjaxMin-provided EncoderFalback object whenever writing JS or CSS code, regardless of what encoding scheme you are using or whether or not your code contains special
 characters. Using the provided EncoderFallback objects will always generate the proper JavaScript or CSS code.&lt;/p&gt;
&lt;h1&gt;What If I Just Want A JS-Encoded Encoded String?&lt;/h1&gt;
&lt;p&gt;That is also easily handled, but it will take a little more work. What we need to do is write the minified code (internally stored by .NET as a UNICODE string) to an array of ASCII-encoded bytes using an instance of JSFallbackEncoder, and then read those
 bytes back into a .NET string using a StreamReader. For instance, you could define a function like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; &lt;strong&gt;GetAsciiEncodedOutput&lt;/strong&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; minified)
{
    var encoder = (Encoding)Encoding.ASCII.Clone();
    encoder.EncoderFallback = &lt;span class="kwrd"&gt;new&lt;/span&gt; Microsoft.Ajax.Utilities.JSEncoderFallback();
    var encodedBytes = encoder.GetBytes(minified);

    &lt;span class="kwrd"&gt;using&lt;/span&gt; (var memoryStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream(encodedBytes))
    {
        &lt;span class="kwrd"&gt;using&lt;/span&gt; (var reader = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(memoryStream))
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; reader.ReadToEnd();
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Sat, 18 May 2013 01:03:34 GMT</pubDate><guid isPermaLink="false">Updated Wiki: EncoderFallbacks 20130518010334A</guid></item><item><title>Updated Wiki: EncoderFallbacks</title><link>https://ajaxmin.codeplex.com/wikipage?title=EncoderFallbacks&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Writing Files with the Encoder Fallbacks&lt;/h1&gt;
&lt;p&gt;If you are using the DLL version of the Microsoft Ajax Minifier, you might have noticed that it does not include
&lt;em&gt;any&lt;/em&gt; file input or output functionality. The DLL only works with in-memory strings. Your application will have to handle reading from or writing to the hard drive. You don’t really need to do anything special to read JavaScript or CSS files. Simply
 use the .NET StreamReader class (System.IO namespace) or any other existing file-reading methodology, although you may have to provide the appropriate Encoding object if it’s not readily determined by the file content itself.
&lt;em&gt;Writing&lt;/em&gt; files, however may or may not be a little more complicated. If your JavaScript doesn’t contain anything outside of the normal ASCII range, then you don’t really need to do anything special. Or if you are writing files in the UTF-8 or UTF-16
 character encodings, you also don’t really need to do anything special. The complication arises if you want to write in a
&lt;em&gt;different&lt;/em&gt; encoding, and if your code contains characters that can’t be represented in that encoding.&lt;/p&gt;
&lt;p&gt;Take, for example, this JavaScript snippet:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;It’s simple, but it contains &lt;a href="http://unicode.org/" target="_blank"&gt;UNICODE&lt;/a&gt; Chinese characters. The string representation of this code is twelve characters long, and the code points are:&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="700" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="58"&gt;0061&lt;/td&gt;
&lt;td valign="top" width="58"&gt;006c&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0065&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0072&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0074&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0028&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0022&lt;/td&gt;
&lt;td valign="top" width="58"&gt;4f60&lt;/td&gt;
&lt;td valign="top" width="58"&gt;597d&lt;/td&gt;
&lt;td valign="top" width="58"&gt;ff01&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0022&lt;/td&gt;
&lt;td valign="top" width="58"&gt;0029&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you write an overly-simple block of code to utilize the StreamWriter class to write this string (in the minifiedCode variable) like so, you will create a file encoded as UTF-8 (the default encoding for StreamWriter):&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;If you open the file up in a binary editor, you will see the characters have been written in eighteen bytes:&lt;/p&gt;
&lt;table cellspacing="0" cellpadding="2" width="700" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="58"&gt;61&lt;/td&gt;
&lt;td valign="top" width="58"&gt;6c&lt;/td&gt;
&lt;td valign="top" width="58"&gt;65&lt;/td&gt;
&lt;td valign="top" width="58"&gt;72&lt;/td&gt;
&lt;td valign="top" width="58"&gt;74&lt;/td&gt;
&lt;td valign="top" width="58"&gt;28&lt;/td&gt;
&lt;td valign="top" width="58"&gt;22&lt;/td&gt;
&lt;td valign="top" width="58"&gt;e4 bd a0&lt;/td&gt;
&lt;td valign="top" width="58"&gt;e5 a5 bd&lt;/td&gt;
&lt;td valign="top" width="58"&gt;ef bc 81&lt;/td&gt;
&lt;td valign="top" width="58"&gt;22&lt;/td&gt;
&lt;td valign="top" width="58"&gt;29&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The Chinese characters have each been encoded into three-byte &lt;a href="http://en.wikipedia.org/wiki/Utf-8" target="_blank"&gt;
UTF-8&lt;/a&gt; sequences. The beauty of this is that UTF-8 can represent any character in the UNICODE character set, which is essentially every character you will really want to use on a computer. Nothing special needs to be done with this file, because browsers
 and any other tools that might want to read it back (like AjaxMin) will correctly read and decode the UTF-8 characters. Loading this file up in Internet Explorer, for example, will get you the original text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;That’s all fine and dandy, but what if you want to save your files in another text encoding, say, ASCII or Big-5? Well, let’s assume we want to write this JavaScript code as an ASCII file. Obviously the ASCII character set does not include the Chinese characters
 in our code snippet. If we do the &lt;em&gt;wrong&lt;/em&gt; thing, and simply pass in the default ASCII encoder to the StreamWriter constructor, you will lose your Chinese characters:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;That code produces a file with twelve bytes, and the three Chinese characters will all be changed into question-marks (0x3F). Probably not what you want.&amp;nbsp; To handle characters outside the encoding scheme, you need to use an
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encoderfallback" target="_blank"&gt;
&lt;strong&gt;EncoderFallback&lt;/strong&gt;&lt;/a&gt; class. To make a long story short, an Encoder Fallback is called whenever a text encoding object is asked to write a character that isn’t in the destination encoding. The default fallback is to simply write a question mark
 (hence the lost Chinese characters). Microsoft Ajax Minifier provides two Encoder Fallback classes for use in your code:
&lt;strong&gt;JSEncoderFallback&lt;/strong&gt; for JavaScript and &lt;strong&gt;CssEncoderFallback&lt;/strong&gt; for CSS. All they do is take the character that cannot be displayed in whatever output encoding you are using, and escape it as appropriate for the particular language.
 For instance, characters in JavaScript are encoded with the UNICODE escape sequence:
&lt;span style="font-family:courier new"&gt;\uXXXX&lt;/span&gt; if the character is in the standard 16-bit UNICODE range, and as the
&lt;a href="http://en.wikipedia.org/wiki/Surrogate_pair" target="_blank"&gt;surrogate pair&lt;/a&gt;
&lt;span style="font-family:courier new"&gt;\uUUUU\uLLLL&lt;/span&gt; if the character is in the extended UNICODE range (all digits in hexadecimal). For CSS code, the escape sequence is
&lt;span style="font-family:courier new"&gt;\XXXXXX&lt;/span&gt;, consisting of up to six hexadecimal digits; if less than six digits are needed, a space character is appended to signify the end of the escape sequence.&lt;/p&gt;
&lt;p&gt;Now, back to our example. If we want to write the file in the ASCII encoding, we need to clone the default ASCII encoding object and set the EncoderFallback property to an instance of our JSEncodeFallback class. We have to clone the default ASCII encoder
 because it will throw an exception if you try to set the EncoderFallback property on the default ASCII encoder object proper.&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = (&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;)&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII.Clone();
encoding.EncoderFallback = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;JSEncoderFallback&lt;/span&gt;();
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;Now when we write our sample code, we will get the following ASCII text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;\u4f60\u597d\uff01&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;Loading that code in a browser that executes the code will get you the desired alert box:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279301"&gt;&lt;img title="image" border="0" alt="image" src="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279302" width="190" height="177" style="border-left-width:0px; border-right-width:0px; border-bottom-width:0px; padding-top:0px; padding-left:0px; margin:0px; display:inline; padding-right:0px; border-top-width:0px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are only a handful of default encoders that you can clone. If you want to encode your output in a
&lt;em&gt;different&lt;/em&gt; encoding, then I would suggest using the Encoding.GetEncoding method, passing in the name of the desired encoding:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.GetEncoding(
    &lt;span style="color:#a31515"&gt;&amp;quot;iso-8859-1&amp;quot;&lt;/span&gt;,
    JSEncoderFallback(),
    &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;DecoderReplacementFallback&lt;/span&gt;(&lt;span style="color:#a31515"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;));
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;The encoding names you can use are defined in the Info.Name column of the data table on
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encodinginfo.name.aspx" target="_blank"&gt;
this MSDN page&lt;/a&gt;. For example, if you want to encode your output in the Big-5 encoding scheme, pass “big5” to the GetEncoding method.&lt;/p&gt;
&lt;p&gt;Generally speaking it’s always a good idea to use an encoding object with the appropriate AjaxMin-provided EncoderFalback object whenever writing JS or CSS code, regardless of what encoding scheme you are using or whether or not your code contains special
 characters. Using the provided EncoderFallback objects will always generate the proper JavaScript or CSS code.&lt;/p&gt;
&lt;h1&gt;What If I Just Want A JS-Encoded Encoded String?&lt;/h1&gt;
&lt;p&gt;That is also easily handled, but it will take a little more work. What we need to do is write the minified code (internally stored by .NET as a UNICODE string) to an array of ASCII-encoded bytes using an instance of JSFallbackEncoder, and then read those
 bytes back into a .NET string using a StreamReader. For instance, you could define a function like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; &lt;strong&gt;GetAsciiEncodedOutput&lt;/strong&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; minified)
{
    var encoder = (Encoding)Encoding.ASCII.Clone();
    encoder.EncoderFallback = &lt;span class="kwrd"&gt;new&lt;/span&gt; Microsoft.Ajax.Utilities.JSEncoderFallback();
    var encodedBytes = encoder.GetBytes(minified);

    &lt;span class="kwrd"&gt;using&lt;/span&gt; (var memoryStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream(encodedBytes))
    {
        &lt;span class="kwrd"&gt;using&lt;/span&gt; (var reader = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(memoryStream))
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; reader.ReadToEnd();
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Sat, 18 May 2013 01:03:03 GMT</pubDate><guid isPermaLink="false">Updated Wiki: EncoderFallbacks 20130518010303A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=27</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and other files that
 you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;font face="Courier New"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified independently, by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given
&lt;font face="Courier New"&gt;&amp;lt;input&amp;gt;&lt;/font&gt; element order. External files therefore must be valid syntax on their own; individual project files may be partial syntax, as long as result of concatenating the adjacent non-project files is valid syntax.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:19:10 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121910A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=26</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and other files that
 you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;font face="Courier New"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given
&lt;font face="Courier New"&gt;&amp;lt;input&amp;gt;&lt;/font&gt; element order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:16:48 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121648A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=25</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;font face="Courier New"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given
&lt;font face="Courier New"&gt;&amp;lt;input&amp;gt;&lt;/font&gt; element order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:16:28 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121628A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=24</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given
&lt;font face="Courier New"&gt;&amp;lt;input&amp;gt;&lt;/font&gt; element order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:15:49 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121549A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=23</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given &amp;lt;input&amp;gt; element
 order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:15:27 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121527A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=22</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given &amp;lt;input&amp;gt; element
 order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:14:37 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121437A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=21</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given &amp;lt;input&amp;gt; element
 order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:14:12 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121412A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=20</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/h2&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;jquery-2.0.0.min.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;origin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;external&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given &amp;lt;input&amp;gt; element
 order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:13:57 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121357A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=19</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or cannot due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of syntax errors.&lt;/font&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#a31515"&gt;input
&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#ff0000"&gt;path&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;/span&gt;&amp;quot;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;jquery-2.0.0.min.js&lt;/font&gt;&lt;/span&gt;&amp;quot;
&lt;span style="white-space:pre; color:"&gt;&lt;font color="#ff0000"&gt;origin&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;/span&gt;&amp;quot;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;external&lt;/font&gt;&lt;/span&gt;&amp;quot;
&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given &amp;lt;input&amp;gt; element
 order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:12:42 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121242A</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=18</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The “input” functionality simply looks
 for all descendent elements of type &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The “naming” functionality simply looks for descendent elements of type
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; and &lt;span style="font-family:courier new"&gt;
–xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:courier new"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory “path” attribute), and the containing
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory “path” attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:courier new"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:courier new"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a “config” attribute, only the arguments that match the current build configuration will be used. In this
 way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required “path” attribute (as previously mentioned), but can also specify the output encoding via an optional “enc” attribute with a value consistent with the –enc switch. The
 type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a “type” attribute with a value of “JS” or “CSS.”&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:courier new"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:courier new"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;…
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required “path” attribute that points to the input file. It can also have an optional “enc” attribute that can specify one of the supported .NET text encoding names to use
 to read that input file. It can also have an “optional” attribute. If no “optional” attribute is specified, the file is considered required and an error will be thrown if it doesn’t exist. But if the value of the “optional” attribute is “true,” no error will
 be thrown if the input files doesn’t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;font style="font-size:11pt"&gt;There is also an optional “origin” attribute, which can be used to specify source files which are not part of the project per se, and which are taken from outside sources. Typically these files are third-party frameworks and
 other files that you don’t want to modify (or &lt;em&gt;cannot&lt;/em&gt; due to licensing reasons), but also for which you don’t want to see a bunch of warnings. Marking a source file as “external” turns off all warnings and all errors except for the most serious of
 syntax errors.&lt;/font&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#a31515"&gt;input
&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#ff0000"&gt;path&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;/span&gt;&amp;quot;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;jquery-2.0.0.min.js&lt;/font&gt;&lt;/span&gt;&amp;quot;
&lt;span style="white-space:pre; color:"&gt;&lt;font color="#ff0000"&gt;origin&lt;/font&gt;&lt;/span&gt;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;/span&gt;&amp;quot;&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;external&lt;/font&gt;&lt;/span&gt;&amp;quot;
&lt;span style="white-space:pre; color:"&gt;&lt;font color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;External files will be minified by themselves, and internal or project files will be minified after concatenating adjacent non-external files. The results will all be concatenated together into the resulting output file in the given &amp;lt;input&amp;gt; element
 order.&lt;/p&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: “from” and “to.” What this element does is create a renaming pair – any variables with a name equal to the “from” attribute value will be renamed to
 the value of the “to” variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, “name”. This element specifies that any variables with a name equal to the “name” attribute value will not be automatically renamed. The attribute
 “id” may be substituted for “name.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:courier new"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, “path,” which specifies the output of the symbol map file.
 By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the “name” attribute should also be specified, with the value “V3”. The only two allowed values for the name are “v3” or “xml” (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:courier new"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory “path” attribute) from which localized strings can be pulled.
 The object to look for in the sources is specified by the optional “name” attribute, and must be a valid JavaScript identifier (IDENT); if the “name” attribute is not specified, the identifier “Strings” is assumed. For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name “Foo” is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name “Foo”, then
 the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:12px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:courier new"&gt;–rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:courier new"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory “from” attribute) that should be renamed (to the IDENT in the mandatory “to” attribute). The
&lt;span style="font-family:courier new"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory “id” attribute) which should not be automatically renamed.
&lt;span style="font-family:courier new"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Wed, 08 May 2013 00:10:51 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130508121051A</guid></item><item><title>Updated Wiki: CSS3Support</title><link>https://ajaxmin.codeplex.com/wikipage?title=CSS3Support&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;AjaxMin CSS3 Support&lt;/h1&gt;
&lt;p&gt;CSS3 is an evolving standard. As such, AjaxMin does not claim to have 100% support for CSS3 syntax. However, as I read the CSS3 specifications on
&lt;a href="http://w3.org"&gt;http://w3.org&lt;/a&gt;, many of the new CSS3 syntax is merely the definition of new properties and values using standard CSS syntax. As such, AjaxMin will support the majority of common CSS3 code. The questionable area is when the new CSS3
 rules create new syntax &amp;ndash; mostly in the area around new at-keywords. Whenever there is a new at-keyword (for example, @top-margin or @keyframes), AjaxMin need to adjust its parser to understand the new syntax. By default, AjaxMin may output new at-keywords
 just fine, except for a warning message if the warning level is turned up high enough. If you are using a CSS3 at-keyword (or any other syntax for that matter) that is not supported by AjaxMin, please file an Issue on this site and I&amp;rsquo;ll address it as
 soon as possible.&lt;/p&gt;
&lt;p&gt;Given that, there are a number of specifications that I believe are fully supported, and a couple that are either partially supported, or are in a state such that I think they may be supported by AjaxMin, but not entirely sure.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Supported CSS3 Specifications&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CSS3 Syntax: &lt;a href="http://www.w3.org/TR/css3-syntax/"&gt;http://www.w3.org/TR/css3-syntax/&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;Selectors Level 3: &lt;a href="http://www.w3.org/TR/selectors/"&gt;http://www.w3.org/TR/selectors/&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;Media Queries: &lt;a href="http://www.w3.org/TR/css3-mediaqueries/"&gt;http://www.w3.org/TR/css3-mediaqueries/&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;CSS Animations Module Level 3: &lt;a href="http://www.w3.org/TR/css3-animations/"&gt;
http://www.w3.org/TR/css3-animations/&lt;/a&gt; &lt;/li&gt;&lt;li&gt;Color Module Level 3: &lt;a href="http://www.w3.org/TR/css3-color/"&gt;http://www.w3.org/TR/css3-color/&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;CSS Namespaces Module: &lt;a href="http://www.w3.org/TR/css3-namespace/"&gt;http://www.w3.org/TR/css3-namespace/&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Partially-Supported CSS3 Specifications&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CSS3 Paged Media: &lt;a href="http://www.w3.org/TR/css3-page/"&gt;http://www.w3.org/TR/css3-page/&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;CSS Values and Units Module Level 3: &lt;a href="http://www.w3.org/TR/css3-values/"&gt;
http://www.w3.org/TR/css3-values/&lt;/a&gt; &lt;/li&gt;&lt;li&gt;CSS Fonts Module Level 3: &lt;a href="http://www.w3.org/TR/css3-fonts/"&gt;http://www.w3.org/TR/css3-fonts/&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If any of the above specifications are not fully supported by AjaxMin and you wish to use those unsupported constructs in your code, please feel free to let us know.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Tue, 07 May 2013 23:45:38 GMT</pubDate><guid isPermaLink="false">Updated Wiki: CSS3Support 20130507114538P</guid></item><item><title>Updated Wiki: EncoderFallbacks</title><link>https://ajaxmin.codeplex.com/wikipage?title=EncoderFallbacks&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:medium"&gt;Writing Files with the Encoder Fallbacks&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you are using the DLL version of the Microsoft Ajax Minifier, you might have noticed that it does not include
&lt;em&gt;any&lt;/em&gt; file input or output functionality. The DLL only works with in-memory strings. Your application will have to handle reading from or writing to the hard drive. You don&amp;rsquo;t really need to do anything special to read JavaScript or CSS files. Simply
 use the .NET StreamReader class (System.IO namespace) or any other existing file-reading methodology, although you may have to provide the appropriate Encoding object if it&amp;rsquo;s not readily determined by the file content itself.
&lt;em&gt;Writing&lt;/em&gt; files, however may or may not be a little more complicated. If your JavaScript doesn&amp;rsquo;t contain anything outside of the normal ASCII range, then you don&amp;rsquo;t really need to do anything special. Or if you are writing files in the UTF-8
 or UTF-16 character encodings, you also don&amp;rsquo;t really need to do anything special. The complication arises if you want to write in a
&lt;em&gt;different&lt;/em&gt; encoding, and if your code contains characters that can&amp;rsquo;t be represented in that encoding.&lt;/p&gt;
&lt;p&gt;Take, for example, this JavaScript snippet:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;It&amp;rsquo;s simple, but it contains &lt;a href="http://unicode.org/" target="_blank"&gt;
UNICODE&lt;/a&gt; Chinese characters. The string representation of this code is twelve characters long, and the code points are:&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="2" width="700"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="58" valign="top"&gt;0061&lt;/td&gt;
&lt;td width="58" valign="top"&gt;006c&lt;/td&gt;
&lt;td width="58" valign="top"&gt;0065&lt;/td&gt;
&lt;td width="58" valign="top"&gt;0072&lt;/td&gt;
&lt;td width="58" valign="top"&gt;0074&lt;/td&gt;
&lt;td width="58" valign="top"&gt;0028&lt;/td&gt;
&lt;td width="58" valign="top"&gt;0022&lt;/td&gt;
&lt;td width="58" valign="top"&gt;4f60&lt;/td&gt;
&lt;td width="58" valign="top"&gt;597d&lt;/td&gt;
&lt;td width="58" valign="top"&gt;ff01&lt;/td&gt;
&lt;td width="58" valign="top"&gt;0022&lt;/td&gt;
&lt;td width="58" valign="top"&gt;0029&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you write an overly-simple block of code to utilize the StreamWriter class to write this string (in the minifiedCode variable) like so, you will create a file encoded as UTF-8 (the default encoding for StreamWriter):&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;If you open the file up in a binary editor, you will see the characters have been written in eighteen bytes:&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="2" width="700"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="58" valign="top"&gt;61&lt;/td&gt;
&lt;td width="58" valign="top"&gt;6c&lt;/td&gt;
&lt;td width="58" valign="top"&gt;65&lt;/td&gt;
&lt;td width="58" valign="top"&gt;72&lt;/td&gt;
&lt;td width="58" valign="top"&gt;74&lt;/td&gt;
&lt;td width="58" valign="top"&gt;28&lt;/td&gt;
&lt;td width="58" valign="top"&gt;22&lt;/td&gt;
&lt;td width="58" valign="top"&gt;e4 bd a0&lt;/td&gt;
&lt;td width="58" valign="top"&gt;e5 a5 bd&lt;/td&gt;
&lt;td width="58" valign="top"&gt;ef bc 81&lt;/td&gt;
&lt;td width="58" valign="top"&gt;22&lt;/td&gt;
&lt;td width="58" valign="top"&gt;29&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The Chinese characters have each been encoded into three-byte &lt;a href="http://en.wikipedia.org/wiki/Utf-8" target="_blank"&gt;
UTF-8&lt;/a&gt; sequences. The beauty of this is that UTF-8 can represent any character in the UNICODE character set, which is essentially every character you will really want to use on a computer. Nothing special needs to be done with this file, because browsers
 and any other tools that might want to read it back (like AjaxMin) will correctly read and decode the UTF-8 characters. Loading this file up in Internet Explorer, for example, will get you the original text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;你好！&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;That&amp;rsquo;s all fine and dandy, but what if you want to save your files in another text encoding, say, ASCII or Big-5? Well, let&amp;rsquo;s assume we want to write this JavaScript code as an ASCII file. Obviously the ASCII character set does not include the
 Chinese characters in our code snippet. If we do the &lt;em&gt;wrong&lt;/em&gt; thing, and simply pass in the default ASCII encoder to the StreamWriter constructor, you will lose your Chinese characters:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;That code produces a file with twelve bytes, and the three Chinese characters will all be changed into question-marks (0x3F). Probably not what you want.&amp;nbsp; To handle characters outside the encoding scheme, you need to use an
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encoderfallback" target="_blank"&gt;
&lt;strong&gt;EncoderFallback&lt;/strong&gt;&lt;/a&gt; class. To make a long story short, an Encoder Fallback is called whenever a text encoding object is asked to write a character that isn&amp;rsquo;t in the destination encoding. The default fallback is to simply write a question
 mark (hence the lost Chinese characters). Microsoft Ajax Minifier provides two Encoder Fallback classes for use in your code:
&lt;strong&gt;JSEncoderFallback&lt;/strong&gt; for JavaScript and &lt;strong&gt;CssEncoderFallback&lt;/strong&gt; for CSS. All they do is take the character that cannot be displayed in whatever output encoding you are using, and escape it as appropriate for the particular language.
 For instance, characters in JavaScript are encoded with the UNICODE escape sequence:
&lt;span style="font-family:Courier New"&gt;\uXXXX&lt;/span&gt; if the character is in the standard 16-bit UNICODE range, and as the
&lt;a href="http://en.wikipedia.org/wiki/Surrogate_pair" target="_blank"&gt;surrogate pair&lt;/a&gt;
&lt;span style="font-family:Courier New"&gt;\uUUUU\uLLLL&lt;/span&gt; if the character is in the extended UNICODE range (all digits in hexadecimal). For CSS code, the escape sequence is
&lt;span style="font-family:Courier New"&gt;\XXXXXX&lt;/span&gt;, consisting of up to six hexadecimal digits; if less than six digits are needed, a space character is appended to signify the end of the escape sequence.&lt;/p&gt;
&lt;p&gt;Now, back to our example. If we want to write the file in the ASCII encoding, we need to clone the default ASCII encoding object and set the EncoderFallback property to an instance of our JSEncodeFallback class. We have to clone the default ASCII encoder
 because it will throw an exception if you try to set the EncoderFallback property on the default ASCII encoder object proper.&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = (&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;)&lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.ASCII.Clone();
encoding.EncoderFallback = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;JSEncoderFallback&lt;/span&gt;();
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;Now when we write our sample code, we will get the following ASCII text:&lt;/p&gt;
&lt;pre&gt;alert(&lt;span style="color:maroon"&gt;&amp;quot;\u4f60\u597d\uff01&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;Loading that code in a browser that executes the code will get you the desired alert box:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279301"&gt;&lt;img title="image" src="http://download.codeplex.com/Download?ProjectName=ajaxmin&amp;DownloadId=279302" border="0" alt="image" width="190" height="177" style="margin:0px; padding-left:0px; padding-right:0px; display:inline; padding-top:0px; border-width:0px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are only a handful of default encoders that you can clone. If you want to encode your output in a
&lt;em&gt;different&lt;/em&gt; encoding, then I would suggest using the Encoding.GetEncoding method, passing in the name of the desired encoding:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;encoding = &lt;span style="color:#2b91af"&gt;Encoding&lt;/span&gt;.GetEncoding(
    &lt;span style="color:#a31515"&gt;&amp;quot;iso-8859-1&amp;quot;&lt;/span&gt;,
    JSEncoderFallback(),
    &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;DecoderReplacementFallback&lt;/span&gt;(&lt;span style="color:#a31515"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;));
&lt;span style="color:blue"&gt;using &lt;/span&gt;(&lt;span style="color:blue"&gt;var &lt;/span&gt;writer = &lt;span style="color:blue"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af"&gt;StreamWriter&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@&amp;quot;c:\test.js&amp;quot;&lt;/span&gt;, &lt;span style="color:blue"&gt;false&lt;/span&gt;, encoding))
{
    writer.Write(minifiedCode);
}&lt;/pre&gt;
&lt;p&gt;The encoding names you can use are defined in the Info.Name column of the data table on
&lt;a href="http://msdn.microsoft.com/en-us/library/system.text.encodinginfo.name.aspx" target="_blank"&gt;
this MSDN page&lt;/a&gt;. For example, if you want to encode your output in the Big-5 encoding scheme, pass &amp;ldquo;big5&amp;rdquo; to the GetEncoding method.&lt;/p&gt;
&lt;p&gt;Generally speaking it&amp;rsquo;s always a good idea to use an encoding object with the appropriate AjaxMin-provided EncoderFalback object whenever writing JS or CSS code, regardless of what encoding scheme you are using or whether or not your code contains
 special characters. Using the provided EncoderFallback objects will always generate the proper JavaScript or CSS code.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Tue, 07 May 2013 23:45:28 GMT</pubDate><guid isPermaLink="false">Updated Wiki: EncoderFallbacks 20130507114528P</guid></item><item><title>Updated Wiki: ConditionalCompilation</title><link>https://ajaxmin.codeplex.com/wikipage?title=ConditionalCompilation&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:medium"&gt;Conditional Compilation Comments&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;JScript implementations in Internet Explorer 4.0 and higher include a preprocessor-style language syntax called
&lt;a href="http://msdn.microsoft.com/en-us/library/ahx1z4fs(v=VS.80).aspx" target="_blank"&gt;
conditional compilation comments&lt;/a&gt;. No other browsers support conditional compilation comments, so anything you do with this is pretty much restricted to IE-only. The syntax is pretty simple:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:#006400"&gt;/*@ multiLine @*/
//@ singleLine
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;There are only three conditional compilation statements: &lt;span style="font-family:Courier New"&gt;
@cc_on&lt;/span&gt;, &lt;span style="font-family:Courier New"&gt;@if&lt;/span&gt;, and &lt;span style="font-family:Courier New"&gt;
@set&lt;/span&gt;. These statements don&amp;rsquo;t have to be within conditional-compilation comments, but if you have them outside the comments, you guarantee that your code will throw script errors in non-IE browsers. It is very important to note that conditional
 compilation comments are ignored until conditional compilation is first &lt;em&gt;turned on&lt;/em&gt;. The best way to turn it on is with the
&lt;span style="font-family:Courier New"&gt;@cc_on&lt;/span&gt; statement:&lt;/p&gt;
&lt;pre&gt;//@cc_on&lt;/pre&gt;
&lt;p&gt;It&amp;rsquo;s a good idea to put that near the top of your code if you&amp;rsquo;re going to use a lot of conditional compilation comments later. The other way to turn this feature on is to have an
&lt;span style="font-family:Courier New"&gt;@if&lt;/span&gt; or &lt;span style="font-family:Courier New"&gt;
@set&lt;/span&gt; statement outside of comments; but again, that makes your code unusable in non-IE browsers so I don&amp;rsquo;t recommend it.&lt;/p&gt;
&lt;p&gt;The @if statement has more in common with certain other languages than it does JavaScript. The bare minimum is the @if keyword, a parenthesized condition, a block of statements to execute if the condition clause is true, and an @end statement to close it
 all out. There can be zero or more optional @elif clauses (each with their own parenthesized conditions), and an optional @else clause.&lt;/p&gt;
&lt;pre&gt;/*@if (condition)
    &lt;span style="color:#006400"&gt;// true statements
&lt;/span&gt;@elif(condition)
    // else-if statements
@else@*/
    // else statements
/*@end@*/&lt;/pre&gt;
&lt;p&gt;Notice how I closed the conditional comment after the &lt;span style="font-family:Courier New"&gt;
@else&lt;/span&gt; keyword and started it up and closed it around the &lt;span style="font-family:Courier New"&gt;
@end&lt;/span&gt;? That is a common pattern that allows the &lt;span style="font-family:Courier New"&gt;
@if&lt;/span&gt; and &lt;span style="font-family:Courier New"&gt;@elif&lt;/span&gt; clauses to execute in IE for the appropriate conditions while being ignored by other browsers (because they think it&amp;rsquo;s all a big comment), but still leaves the
&lt;span style="font-family:Courier New"&gt;@else&lt;/span&gt; block for non-IE browsers (and any IE browsers that don&amp;rsquo;t meet any of the previous conditions).&lt;/p&gt;
&lt;p&gt;There are a bunch of &lt;a href="http://msdn.microsoft.com/en-us/library/7142yyxw.aspx" target="_blank"&gt;
useful pre-defined conditional compilation variables&lt;/a&gt; you can use in your conditions, but you can also set your own variables using the @set statement:&lt;/p&gt;
&lt;pre&gt;//@set @myvar = 42&lt;/pre&gt;
&lt;p&gt;Custom conditional compilation variables have limited usefulness: they can only have numeric or Boolean values (no strings) and they are pretty much only good within other conditional compilation comments. Another thing to keep in mind is that if you assign
 an expression to the variable, it needs to be placed inside parentheses:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:#006400"&gt;//@set @othervar = (@_jscript_build * 1000)
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;However, this isn&amp;rsquo;t going to be a tutorial on how to write great code using conditional compilation on IE. Please go to
&lt;a href="http://msdn.microsoft.com" target="_blank"&gt;MSDN&lt;/a&gt; if you want to learn more, or just
&lt;a href="http://www.bing.com/search?q=jscript&amp;#43;conditional&amp;#43;compilation" target="_blank"&gt;
Bing it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:medium"&gt;&lt;strong&gt;Using Conditional Compilation with Ajax Minifier&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In general, AjaxMin only supports statement-level conditional compilation comments.&lt;/strong&gt; That means the conditional compilation comment needs to be at the
&lt;em&gt;start&lt;/em&gt; of a new statement, and can contain only &lt;em&gt;whole statements&lt;/em&gt;. For instance:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;a = 10;
/*@cc_on@if(@_jscript_version &amp;gt; 5.6)
    alert(&amp;quot;IE7 or higher&amp;quot;);
@else@*/
    alert(&lt;span style="color:maroon"&gt;&amp;quot;non-IE [or IE6 or earlier]&amp;quot;&lt;/span&gt;);
&lt;span style="color:#006400"&gt;//@end
&lt;/span&gt;alert(a);&lt;/pre&gt;
&lt;p&gt;Stick to that pattern and you should be just fine. If any conditional compilation comments are encountered in situations that are not explicitly noted here,
&lt;em&gt;they will be ignored&lt;/em&gt;. This is important! AjaxMin will throw a warning whenever it encounters a conditional compilation comment that it ignores, but the severity will be sufficiently low to not show up by default unless you bump the warning level (or
 use the &lt;span style="font-family:Courier New"&gt;&amp;ndash;analyze&lt;/span&gt; switch). When developing your application, I strongly urge you to use the &amp;ndash;analyze switch to catch errors in your code.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:medium"&gt;Special-Case Exceptions&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In all honesty, I&amp;rsquo;m a bit of a JavaScript purist and don&amp;rsquo;t particularly care for JScript conditional-compilation. However, it
&lt;em&gt;can&lt;/em&gt; be useful sometimes as a super-easy and 100% effective way of determining if you are running in Internet Explorer, since it is
&lt;em&gt;the&lt;/em&gt; only browser that supports this syntax. Relying on things like document.all or [heaven forbid] user-agent sniffing can sometimes give you the wrong answer. As such, there are a couple nifty ways to use conditional compilation that are special-cased
 within AjaxMin.&lt;/p&gt;
&lt;p&gt;First off, inside a &lt;span style="font-family:Courier New"&gt;var&lt;/span&gt;-statement, you can use conditional compilation around the assignment operator
&lt;em&gt;and&lt;/em&gt; the initializing expression. For example:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;isIE/*@cc_on=1@*/;&lt;/pre&gt;
&lt;p&gt;After this statement is executed, the variable &amp;ldquo;isIE&amp;rdquo; will be 1 (true-equivalent) for Internet Explorer browsers, and undefined (false-equivalent) if not. You can then do something like the following:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;isIE/*@cc_on=1@*/;
&lt;span style="color:blue"&gt;if &lt;/span&gt;(isIE)
{
    &lt;span style="color:#006400"&gt;// ie-specific code
&lt;/span&gt;}
&lt;span style="color:blue"&gt;else
&lt;/span&gt;{
    &lt;span style="color:#006400"&gt;// non-ie code
&lt;/span&gt;}&lt;/pre&gt;
&lt;p&gt;As of version 4.29, AjaxMin also special-cases the &lt;span style="font-family:Courier New"&gt;
!&lt;/span&gt;-operator (logical not) if &amp;ndash; and &lt;em&gt;only&lt;/em&gt; if &amp;ndash; it is the
&lt;em&gt;only&lt;/em&gt; thing within the conditional comment (other than an optional initial
&lt;span style="font-family:Courier New"&gt;@cc_on&lt;/span&gt; statement). You could therefore write something like this:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;if &lt;/span&gt;(/*@cc_on!@*/0)
{
    &lt;span style="color:#006400"&gt;// ie-specific code
&lt;/span&gt;}
&lt;span style="color:blue"&gt;else
&lt;/span&gt;{
    &lt;span style="color:#006400"&gt;// non-ie code
&lt;/span&gt;}&lt;/pre&gt;
&lt;p&gt;Other than those instances, sticking to statement-level conditional-compilation statements is the way to go,
&lt;em&gt;if&lt;/em&gt; you absolutely need to use them.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Tue, 07 May 2013 23:45:16 GMT</pubDate><guid isPermaLink="false">Updated Wiki: ConditionalCompilation 20130507114516P</guid></item><item><title>Updated Wiki: Problems with Evals</title><link>https://ajaxmin.codeplex.com/wikipage?title=Problems with Evals&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;span style="font-size:medium"&gt;&lt;strong&gt;Problems with Evals&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Eval-statements provide a special kind of problem for script minifiers. For the most part, there are very few things you can do with an eval-statement that you can&amp;rsquo;t do some other, safer way. Two examples are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;generating a JS object from a JSON string in older browsers that don&amp;rsquo;t support the JSON object, and
&lt;/li&gt;&lt;li&gt;wrapping modern syntax not supported on older browsers you have still to support with your code.
&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;For an example of the latter, if you need to support WebTV (for example) and you need to use a try/catch statement in your code, you&amp;rsquo;re pretty much out of luck because the try/catch statement itself isn&amp;rsquo;t supported on that older platform and
 will throw a script error when your code is parsed. Instead, you&amp;rsquo;ll have to carefully wrap your code in an eval-statement so it will parse, and try to make sure it doesn&amp;rsquo;t actually get called for WebTV clients.&lt;/p&gt;
&lt;p&gt;Other than those two examples, there really aren&amp;rsquo;t a lot of good reasons to use eval-statements. As
&lt;a href="http://javascript.crockford.com/code.html" target="_blank"&gt;Douglas Crockford&lt;/a&gt; has said: &amp;ldquo;eval is evil.&amp;rdquo; But people do use them sometimes. AjaxMin
&lt;em&gt;&lt;span style="text-decoration:underline"&gt;by default&lt;/span&gt;&lt;/em&gt;, does not treat eval-statements any differently than any other code. That may seem like a dangerous stand to take, but I totally agree with Crockford and think eval-statements should be avoided
 if at all possible. By taking this stand I am hoping to force developers to realize their code has eval-statements in it and consider them more closely and conscientiously. If you don&amp;rsquo;t use any eval-statements, or use an eval-statement only for something
 like JSON evaluation, you should not have any problems with AjaxMin. If you use eval-statements for any other purpose and reference local variables and/or function names within the evaluated string, then your minified code may break and you will need to either
 change your code to not use an eval-statement, or fall back to using a different eval-mode using the
&lt;span style="font-family:Courier New"&gt;&amp;ndash;evals&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
command-line switch&lt;/a&gt; (or the &lt;span style="font-family:Courier New"&gt;CodeSettings.EvalTreatment&lt;/span&gt; property if you are using the DLL version).&lt;/p&gt;
&lt;p&gt;The primary reason I don&amp;rsquo;t like eval-statements is simple run-time performance. Whenever an eval-statement is executed, a JavaScript parser needs to get spun up and parse the source string before it can be executed. That is not a free exercise. If
 you want your code to operate efficiently and quickly, parsing and reparsing is not going to help you out.&lt;/p&gt;
&lt;p&gt;And don&amp;rsquo;t forget that there are more ways to execute an &amp;ldquo;eval&amp;rdquo; than just calling the eval function. The
&lt;span style="font-family:Courier New"&gt;Function&lt;/span&gt; object constructor is an implicit eval &amp;ndash; it has to parse and execute the strings passed to it in order to create the function object. Passing strings to
&lt;span style="font-family:Courier New"&gt;setTimeout&lt;/span&gt; and &lt;span style="font-family:Courier New"&gt;
setInterval&lt;/span&gt; also perform an implicit eval &amp;ndash; every time the timer fires, the strings have to be reparsed before they can be executed. Try to avoid these situations if possible; there usually is a much cleaner way to do the same thing.&lt;/p&gt;
&lt;p&gt;There are a few common eval-statement patterns I see in JavaScript that always make me cry when I read them. I have only come across a tiny handful of situations where an eval-statement seems like a good idea; the
&lt;em&gt;vast&lt;/em&gt; majority of times it&amp;rsquo;s just bad coding. For instance, I see things like this a lot (and I&amp;rsquo;m pretty sure puppies somewhere die whenever code like this is released to the web):&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;function &lt;/span&gt;foo(obj, prop)
{
    &lt;span style="color:blue"&gt;return &lt;/span&gt;&lt;span style="background-color:#ffff00"&gt;eval(&lt;span style="color:maroon"&gt;&amp;quot;obj.&amp;quot; &lt;/span&gt;&amp;#43; prop)&lt;/span&gt;;
}&lt;/pre&gt;
&lt;p&gt;For the love of Pete, please don&amp;rsquo;t &lt;em&gt;ever&lt;/em&gt; do that. JavaScript properties can be accessed multiple ways, and if you don&amp;rsquo;t know the name of the property at compile-time, use the
&lt;span style="font-family:Courier New"&gt;[]&lt;/span&gt;-operator:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;function &lt;/span&gt;foo(obj, prop)
{
    &lt;span style="color:blue"&gt;return &lt;/span&gt;&lt;span style="background-color:#ffff00"&gt;obj[prop]&lt;/span&gt;;
}&lt;/pre&gt;
&lt;p&gt;I also frequently see people using string arguments to &lt;span style="font-family:Courier New"&gt;
setTimeout&lt;/span&gt; when they want to pass parameters to the function that gets called when the timeout fires. As with most other cases of eval-statement usages, there is a better way. If you don&amp;rsquo;t understand JavaScript closures very well, I strongly suggest
 you Bing &lt;a href="http://www.bing.com/search?q=JavaScript&amp;#43;closures" target="_blank"&gt;
&amp;ldquo;JavaScript closures&amp;rdquo;&lt;/a&gt; right now and do a little reading. They are what make JavaScript a powerful programming language, and a thorough understanding of how they work will save you a lot of time and many headaches. Anyhow, let&amp;rsquo;s get to
 an example. Instead of:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;function &lt;/span&gt;foo(n, v)
{
    alert(n &amp;#43; &lt;span style="color:maroon"&gt;&amp;quot;: &amp;quot; &lt;/span&gt;&amp;#43; v);
}
&lt;span style="color:blue"&gt;var &lt;/span&gt;name, val;
&lt;span style="color:#006400"&gt;// set name and val somehow
&lt;/span&gt;window.setTimeout(&lt;span style="background-color:#ffff00"&gt;&lt;span style="color:maroon"&gt;&amp;quot;foo('&amp;quot; &lt;/span&gt;&amp;#43; name &amp;#43; &lt;span style="color:maroon"&gt;&amp;quot;', '&amp;quot; &lt;/span&gt;&amp;#43; val &amp;#43; &lt;span style="color:maroon"&gt;&amp;quot;')&amp;quot;&lt;/span&gt;&lt;/span&gt;, 2000);&lt;/pre&gt;
&lt;p&gt;code it like:&lt;/p&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;function &lt;/span&gt;foo(n, v)
{
    alert(n &amp;#43; &lt;span style="color:maroon"&gt;&amp;quot;: &amp;quot; &lt;/span&gt;&amp;#43; v);
}
&lt;span style="color:blue"&gt;var &lt;/span&gt;name, val;
&lt;span style="color:#006400"&gt;// set name and val somehow
&lt;/span&gt;window.setTimeout(&lt;span style="background-color:#ffff00"&gt;&lt;span style="color:blue"&gt;function&lt;/span&gt;(){foo(name, val)}&lt;/span&gt;, 2000);&lt;/pre&gt;
&lt;p&gt;I won&amp;rsquo;t get into the details of how closures work in this article, but calling
&lt;span style="font-family:Courier New"&gt;setTimeout&lt;/span&gt; this way will call your function with the proper parameters when the timeout fires
&lt;em&gt;without&lt;/em&gt; having to fire up the JavaScript parser again -- &lt;em&gt;and&lt;/em&gt; you won&amp;rsquo;t have to worry about any syntax errors should the name or value variables point to a string that contains single-quotes! Of course, this sample is a little contrived;
 it might be better to just inline the target function altogether. It all really depends upon your situation. The point being the use of closures in situations like this will greatly help your application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:medium"&gt;&lt;strong&gt;What To Do?&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Okay, so let&amp;rsquo;s say you &lt;em&gt;need&lt;/em&gt; to use eval-statements in your code, but when you minify it with AjaxMin, your application breaks. What do you do? You need to specify a different &amp;ldquo;Eval Treatment&amp;rdquo; mode. There are three values you can
 specify with the &amp;ndash;evals &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switch&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;-evals:&lt;strong&gt;ignore&lt;/strong&gt; &lt;/li&gt;&lt;li&gt;-evals:&lt;strong&gt;immediate&lt;/strong&gt; &lt;/li&gt;&lt;li&gt;-evals:&lt;strong&gt;safeall&lt;/strong&gt; &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The first is the default: ignore them and treat them like any other statement and hope for the best. The second one will make sure that variables and functions&lt;em&gt; within the same scope&lt;/em&gt; as the eval-statement are not renamed, so if the eval-statement
 doesn&amp;rsquo;t reference anything in a parent scope, it shouldn&amp;rsquo;t run into any problems. The last one is the nuclear-option: no variables or function will be renamed or removed not only in the current scope,
&lt;em&gt;but also all parent scopes&lt;/em&gt; up the chain to the global scope. Use this option only if you need it, because it could result in a minified result much larger than it needs to be. But it should always work.&lt;/p&gt;
&lt;p&gt;Of course, I&amp;rsquo;ll say it again: the best option is to not use eval-statements at all.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Tue, 07 May 2013 23:45:05 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Problems with Evals 20130507114505P</guid></item><item><title>Updated Wiki: AjaxMinTask</title><link>https://ajaxmin.codeplex.com/wikipage?title=AjaxMinTask&amp;version=13</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;&lt;strong&gt;&lt;span style="font-size:small"&gt;Using the Supplied AjaxMinTask.dll In Your Project&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Part of the Microsoft Ajax Minifier install package is an MSBuild task that can imported and used in your Visual Studio projects to automatically minify your JS and CSS files. The files you need are installed into the
&lt;span style="font-family:Courier New"&gt;&amp;lt;PROGRAMFILES&amp;gt;\MSBuild\Microsoft\MicrosoftAjax&lt;/span&gt; folder via the MSI installer. You can either work from scratch and edit your .csproj file to work with wildcard .JS and/or .CSS files as described below, or you
 can use an &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=XML%20File%20Formats"&gt;
Ajax Minifier Manifest File&lt;/a&gt; and the associated &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
Manifest Build Task&lt;/a&gt;. These instructions assume that the Microsoft Ajax Minifier has been installed via the MSI download from the CodePlex website.&lt;/p&gt;
&lt;p&gt;To automatically minify your JS and CSS, right-click on your project in the Solution Explorer and select &amp;ldquo;Unload Project&amp;rdquo; from the context menu. Right-click on it again, and select the &amp;ldquo;Edit&amp;rdquo; option from the context menu; this will
 open your project file in an XML editor. Scroll down to the bottom of the file and add the following XML:&lt;/p&gt;
&lt;pre&gt;&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;Import&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Project&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\AjaxMin.tasks&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;Target&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Name&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;AfterBuild&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;ItemGroup&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;            &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;JS&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Include&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;**\*.js&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Exclude&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;**\*.min.js;Scripts\*.js&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;ItemGroup&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;ItemGroup&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;            &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;CSS&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Include&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;**\*.css&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Exclude&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;**\*.min.css&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;ItemGroup&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;AjaxMin&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;            &lt;span style="color:#ff0000"&gt;JsSourceFiles&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;@(JS)&amp;quot;&lt;/span&gt;  &lt;span style="color:#ff0000"&gt;JsSourceExtensionPattern&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;\.js$&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;JsTargetExtension&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;.min.js&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;            &lt;span style="color:#ff0000"&gt;CssSourceFiles&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;@(CSS)&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;CssSourceExtensionPattern&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;\.css$&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;CssTargetExtension&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;.min.css&amp;quot;&lt;/span&gt;  &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;Target&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;You can also check the AjaxMinTask.dll into your project and use the &lt;span style="font-family:Courier New"&gt;
&amp;lt;UsingTask&amp;gt;&lt;/span&gt; element instead of the &lt;span style="font-family:Courier New"&gt;
&amp;lt;Import&amp;gt;&lt;/span&gt; element. For example, if you create a &amp;ldquo;Build&amp;rdquo; folder under your project and check the AjaxMinTask.dll into that folder, you can add this element instead of the
&lt;span style="font-family:Courier New"&gt;&amp;lt;Import&amp;gt;&lt;/span&gt; element above:&lt;/p&gt;
&lt;pre&gt;&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;UsingTask&lt;/span&gt; &lt;span style="color:#ff0000"&gt;TaskName&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;AjaxMin&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;AssemblyFile&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;$(MSBuildProjectDirectory)\Build\AjaxMinTask.dll&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;Many of the code settings that can be set using the CodeSettings object can also be set in your project file tasks. For example, to specify a set of known global identifiers (similar to the
&lt;span style="font-family:Courier New"&gt;&amp;ndash;global&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switch&lt;/a&gt; or the KnownGlobalNamesList property), use the JsKnownGlobalNames attribute on the
&lt;span style="font-family:Courier New"&gt;&amp;lt;AjaxMin&amp;gt;&lt;/span&gt; element:&lt;/p&gt;
&lt;pre&gt;&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;AjaxMin&lt;/span&gt; &lt;span style="color:#ff0000"&gt;JsKnownGlobalNames&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;jQuery,$&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;JsEvalTreatment&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;MakeImmediateSafe&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;    &lt;span style="color:#ff0000"&gt;JsSourceFiles&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;@(JS)&amp;quot;&lt;/span&gt;  &lt;span style="color:#ff0000"&gt;JsSourceExtensionPattern&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;\.js$&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;JsTargetExtension&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;.min.js&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#ff0000"&gt;CssSourceFiles&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;@(CSS)&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;CssSourceExtensionPattern&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;\.css$&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;CssTargetExtension&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;.min.css&amp;quot;&lt;/span&gt;  &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;Once you have imported the task, there are many ways to set up your build system to do what you want to do with your CSS and JS files. Alexander Turlov posted an
&lt;a href="http://blog.turlov.com/2009/11/automatically-compress-embedded.html" target="_blank"&gt;
interesting article&lt;/a&gt; on how he integrated Ajax Minifier to his project to copy the sources to an output folder and minify them in-place.&lt;/p&gt;
&lt;p&gt;An even easier method of specifying AjaxMin switches in your build task is to use a command-line string in the
&lt;strong&gt;Switches&lt;/strong&gt; parameter. Not all command-line switches are supported in the build task, however. One notable example is the &amp;ndash;xml switch. The following example would be the equivalent to the previous example:&lt;/p&gt;
&lt;pre&gt;&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;AjaxMin&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Switches&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;-global:jQuery,$ &amp;ndash;evals:immediate&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#ffffff"&gt;&lt;span style="color:#ff0000"&gt;    JsSourceFiles&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;@(JS)&amp;quot;&lt;/span&gt;  &lt;span style="color:#ff0000"&gt;JsSourceExtensionPattern&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;\.js$&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;JsTargetExtension&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;.min.js&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="font-size:11px; font-family:consolas,'Courier New',courier,monospace; margin:0em; width:100%; background-color:#f0f0f0"&gt;    &lt;span style="color:#ff0000"&gt;CssSourceFiles&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;@(CSS)&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;CssSourceExtensionPattern&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;\.css$&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;CssTargetExtension&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;.min.css&amp;quot;&lt;/span&gt;  &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;Another option for the task is to combine all the JS source files into a single minified file. Instead of specifying the JsSourceExtensionPattern/JsTargetExtension pair, specify the JsCombinedFileName attribute and all the source files will be concatenated
 together, minified, and written to the file named by the JsCombinedFileName attribute. Same goes for the CssSourceExtensionPatter/CssTargetExtension pair and the new CssCombinedFileName attribute:&lt;/p&gt;
&lt;pre&gt;&lt;span style="font-size:x-small"&gt;  &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;AjaxMin &lt;/span&gt;&lt;span style="color:red"&gt;Switches&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;-global:jQuery,$&lt;/span&gt;&amp;quot;
      &lt;span style="color:red"&gt;JsSourceFiles&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;@(JS)&lt;/span&gt;&amp;quot;  &lt;span style="color:red"&gt;JsCombinedFileName&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Combined.min.js&lt;/span&gt;&amp;quot;
      &lt;span style="color:red"&gt;CssSourceFiles&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;@(CSS)&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;CssCombinedFileName&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Combined.min.css&lt;/span&gt;&amp;quot;  &lt;/span&gt;&lt;span style="color:blue"&gt;&lt;span style="font-size:x-small"&gt;/&amp;gt;&lt;/span&gt;  

&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Tue, 07 May 2013 23:44:35 GMT</pubDate><guid isPermaLink="false">Updated Wiki: AjaxMinTask 20130507114435P</guid></item><item><title>Updated Wiki: AjaxMin DLL</title><link>https://ajaxmin.codeplex.com/wikipage?title=AjaxMin DLL&amp;version=17</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;span style="font-size:small"&gt;&lt;strong&gt;AjaxMin.DLL&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The Microsoft Ajax Minifier also provides a DLL that can be used in your own applications. Classes are defined in the
&lt;strong&gt;Microsoft.Ajax.Utilities&lt;/strong&gt; namespace. There are two main ways to access the functionality.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:small"&gt;Minifier Class&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Instantiate the Minifier class and call either the &lt;span style="font-family:Courier New"&gt;
MinifyJavaScript&lt;/span&gt; or &lt;span style="font-family:Courier New"&gt;MinifyStyleSheet&lt;/span&gt; methods, passing in the source to be minified as a string value. The return value from both those functions is the minified code as a string value. If there were any errors
 or warnings minifying your code, they will be in the ErrorList property, which is an ICollection&amp;lt;ContextError&amp;gt;. This is the simplest way to minify your sources using the DLL.&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.IO;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.Ajax.Utilities;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; AjaxMinSample
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;{
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Program
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    {
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Main(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;[] args)
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        {
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (args.Length == 1)
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            {
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; source;
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                &lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (var inputFile = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; StreamReader(args[0]))
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                    source = inputFile.ReadToEnd();
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                }
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                var minifier = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Minifier();
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                Console.WriteLine(minifier.MinifyJavaScript(source));
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                &lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (var error &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; minifier.ErrorList)
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                    Console.Error.WriteLine(error.ToString());
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                }
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            }
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        }
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    }
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;}
&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small"&gt;&lt;strong&gt;CssSettings&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The &lt;span style="font-family:Courier New"&gt;MinifyStylesheet&lt;/span&gt; method can optionally take a
&lt;span style="font-family:Courier New"&gt;CssSettings&lt;/span&gt; object to specify various CSS minification settings. There are two ways to generate one: manually, by creating a default
&lt;span style="font-family:Courier New"&gt;CssSettings&lt;/span&gt; object and then setting all properties you wish to change from the default settings, or by creating an instance of the
&lt;span style="font-family:Courier New"&gt;SwitchParser&lt;/span&gt; object, parsing a command-line switch by calling the
&lt;span style="font-family:Courier New"&gt;Parse&lt;/span&gt; method on that object, and then passing the generated Css&lt;span style="font-family:Courier New"&gt;Settings&lt;/span&gt; property as the second parameter to the
&lt;span style="font-family:Courier New"&gt;MinifyStylesheet&lt;/span&gt; method.&lt;/p&gt;
&lt;pre&gt;&lt;span style="font-size:x-small"&gt;&lt;span style="color:blue"&gt;var &lt;/span&gt;switchParser = &lt;span style="color:blue"&gt;new &lt;/span&gt;SwitchParser();
switchParser.Parse(&lt;span style="color:#a31515"&gt;&amp;quot;-css:decls -colors:hex&amp;quot;&lt;/span&gt;);
&lt;span style="color:blue"&gt;var &lt;/span&gt;minifier = &lt;span style="color:blue"&gt;new &lt;/span&gt;Minifier();
&lt;span style="color:blue"&gt;var &lt;/span&gt;minifiedStyle = minifier.MinifyStyleSheet(styleAttrValue, switchParser.CssSettings);&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:small"&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:small"&gt;CodeSettings&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;span style="font-family:Courier New"&gt;MinifyJavaScript&lt;/span&gt; method can optionally take a
&lt;span style="font-family:Courier New"&gt;CodeSettings&lt;/span&gt; object to specify various JavaScript minification settings.&amp;nbsp; The
&lt;span style="font-family:Courier New"&gt;JSParser&lt;/span&gt; object&amp;rsquo;s &lt;span style="font-family:Courier New"&gt;
Parse&lt;/span&gt; method must be passed a &lt;span style="font-family:Courier New"&gt;CodeSettings&lt;/span&gt; object. There are two ways to generate one: manually, by creating a default
&lt;span style="font-family:Courier New"&gt;CodeSettings&lt;/span&gt; object and then setting all properties you wish to change from the default settings, or by creating an instance of the&amp;nbsp;
&lt;span style="font-family:Courier New"&gt;SwitchParser&lt;/span&gt; object, parsing a command-line switch by calling the
&lt;span style="font-family:Courier New"&gt;Parse&lt;/span&gt; method on the object, and then passing the generated
&lt;span style="font-family:Courier New"&gt;JSSettings&lt;/span&gt; property as the second parameter to the
&lt;span style="font-family:Courier New"&gt;MinifyJavaScript&lt;/span&gt; method, or as the only parameter to the
&lt;span style="font-family:Courier New"&gt;Parse&lt;/span&gt; method on the &lt;span style="font-family:Courier New"&gt;
JSParser&lt;/span&gt; object.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:small"&gt;JSParser Classes&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you wish to take advantage of the JavaScript parser and examine and/or manipulate the resulting abstract syntax tree (AST), you can instantiate an object of the type
&lt;span style="font-family:Courier New"&gt;JSParser&lt;/span&gt;, and utilize its methods and properties directly. The main advantage here is that the parser returns an object of type Block that represents the top-level set of statements for the input script. It is then
 possible to traverse the tree, delete nodes, add nodes, move them around, rename variables &amp;ndash; anything is possible once you have the AST. And once you are done, simply call the
&lt;span style="font-family:Courier New"&gt;ToCode&lt;/span&gt; method on the Block object returned from the parser to get the resulting JavaScript code.&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.IO;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.Ajax.Utilities;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; AjaxMinSample
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;{
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Program
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    {
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Main(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;[] args)
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        {
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (args.Length == 1)
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            {
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; source;
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                &lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (var inputFile = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; StreamReader(args[0]))
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                    source = inputFile.ReadToEnd();
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                }
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                JSParser parser = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; JSParser(source);
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                parser.CompilerError &amp;#43;= ErrorHandler;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                CodeSettings settings = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; CodeSettings();
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                Block block = parser.Parse(settings);
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                Console.WriteLine(block.ToCode());
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            }
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        }
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; ErrorHandler(&lt;span style="color:#0000ff"&gt;object&lt;/span&gt; source, JScriptExceptionEventArgs ea)
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            Console.Error.WriteLine(ea.Error.ToString());
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        }
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    }
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;}
&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:small"&gt;AST Traversal&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you would like to traverse the entire tree from root to leaf, you could start with the Block object and simply iterate over all the nodes in the Children collection recursively:&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; IterateChildren(AstNode node)
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            &lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (var child &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; node.Children)
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;                IterateChildren(child);
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            }
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        }
&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;Or you can use a &lt;a href="http://en.wikipedia.org/wiki/Visitor_pattern" target="_blank"&gt;
Visitor pattern&lt;/a&gt;. Define a new class derived from the Microsoft.Ajax.Utilities.TreeVisitor class. There are a number of virtual methods on TreeVisitor &amp;ndash; one for each concrete AST node type &amp;ndash; that can be overridden. The base TreeVisitor class
 methods simply iterates over the node&amp;rsquo;s children nodes. For example, if the desire it to iterate over all the nodes in the tree and print out the name of all variables defined in var statements, a visitor can be define like this:&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; MyVisitor : TreeVisitor
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; MyVisitor() { }
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Visit(VariableDeclaration node)
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        {
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            &lt;span style="color:#0000ff"&gt;base&lt;/span&gt;.Visit(node);
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;            Console.WriteLine(node.Identifier);
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        }
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;    }&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;To execute the visitor, instantiate an object and pass the Block node to the Visit method:&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        var myVisitor = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; MyVisitor();
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:11px"&gt;        myVisitor.Visit(block);&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;Nodes in the AST tree can be created, inserted, replaced, deleted, and modified. Internally Ajax Minifier uses a number of visitor classes to modify the tree for maximum minification.&lt;/p&gt;
&lt;p&gt;Unfortunately, currently only JavaScript is parsed into an AST that can be traversed. The CSS syntax tree is not available at this time.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Tue, 07 May 2013 23:44:25 GMT</pubDate><guid isPermaLink="false">Updated Wiki: AjaxMin DLL 20130507114425P</guid></item><item><title>Updated Wiki: XML File Formats</title><link>https://ajaxmin.codeplex.com/wikipage?title=XML File Formats&amp;version=17</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;There are two types of XML files that can be used as input to the command-line version of the Microsoft Ajax Minifier. The first specifies input and output files and is called a
&lt;em&gt;manifest file&lt;/em&gt;; the second specified rules for renaming variable, properties, and functions.&lt;/p&gt;
&lt;p&gt;Technically, both sets of information can be specified in the same file. The root element is ignored and can use any element name at all (although there has to be a single root element for the file to be valid XML). The &amp;ldquo;input&amp;rdquo; functionality
 simply looks for all descendent elements of type &lt;span style="font-family:Courier New"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; and operates on them. The &amp;ldquo;naming&amp;rdquo; functionality simply looks for descendent elements of type
&lt;span style="font-family:Courier New"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; and &lt;span style="font-family:Courier New"&gt;
&amp;lt;norename&amp;gt;&lt;/span&gt;. All three of these elements can exist under the root elements, and the same XML file can be specified in both the
&lt;span style="font-family:Courier New"&gt;&amp;ndash;rename&lt;/span&gt; and &lt;span style="font-family:Courier New"&gt;
&amp;ndash;xml&lt;/span&gt; &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;
switches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The manifest file can also be used as the input to the &lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;
AjaxMin Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;XML Manifest File&lt;/h1&gt;
&lt;p&gt;The simplest version of a manifest file has a root element that contains one or more
&lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements. Each &lt;span style="font-family:Courier New"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element may contain one or more &lt;span style="font-family:Courier New"&gt;
&amp;lt;input&amp;gt;&lt;/span&gt; elements. The &lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element specifies an output file (the OFILE in the mandatory &amp;ldquo;path&amp;rdquo; attribute), and the containing
&lt;span style="font-family:Courier New"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements specify the source file(s) (the IFILE in the mandatory &amp;ldquo;path&amp;rdquo; attribute) to use to create the output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\FirstOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;..\..\Output\XmlInput\SecondOutputFile.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input2.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input1.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;input3.js&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;root&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the manifest file can do even more. For example, the root element may contain an
&lt;span style="font-family:Courier New"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, which has a string value of switches that is parsed to create the default settings to use when generating each
&lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; file. Each &lt;span style="font-family:Courier New"&gt;
&amp;lt;output&amp;gt;&lt;/span&gt; element can also contain an &lt;span style="font-family:Courier New"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element to specify settings that are laid on top of the default settings specified at the root.&lt;/p&gt;
&lt;h2&gt;&amp;lt;arguments&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;There are no required attributes for the &lt;span style="font-family:Courier New"&gt;
&amp;lt;arguments&amp;gt;&lt;/span&gt; element, and it only contains a single text string that is parsed as
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=Command-Line%20Switches"&gt;command-line switches&lt;/a&gt; for either the entire set (if a child of the root element) or the specific output file (if a child of an
&lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:0x400 -eval:safeall&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is one optional attribute for the &amp;lt;arguments&amp;gt; element: config. This is only useful when using the manifest with the
&lt;a href="http://ajaxmin.codeplex.com/wikipage?title=ManifestTask"&gt;Manifest Build Task&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The .targets file supplied with Microsoft Ajax Minifier passes the build configuration to the build task. If the &amp;lt;arguments&amp;gt; element includes a &amp;ldquo;config&amp;rdquo; attribute, only the arguments that match the current build configuration will be used.
 In this way, separate Debug and Release options can be specified in your manifest file:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Debug&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-kill:-1 -minify:false -line:M&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments &lt;/span&gt;&lt;span style="color:red"&gt;config&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;Release&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;-rename:all&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;arguments&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;output&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; elements have a required &amp;ldquo;path&amp;rdquo; attribute (as previously mentioned), but can also specify the output encoding via an optional &amp;ldquo;enc&amp;rdquo; attribute with a value consistent
 with the &amp;ndash;enc switch. The type of the output file (JavaScript or StyleSheet&amp;quot;) can either be determined by the extensions of the input files, or if they are inconclusive or non-standard, the
&lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element can have a &amp;ldquo;type&amp;rdquo; attribute with a value of &amp;ldquo;JS&amp;rdquo; or &amp;ldquo;CSS.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Inside the &lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element are one or more required
&lt;span style="font-family:Courier New"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements, as previously mentioned. But it can also contain an
&lt;span style="font-family:Courier New"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt; element, any number of
&lt;span style="font-family:Courier New"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, any number of
&lt;span style="font-family:Courier New"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements, an optional
&lt;span style="font-family:Courier New"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element, and any number of
&lt;span style="font-family:Courier New"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt; elements.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;output &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;utf-16&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;&amp;gt;
    &lt;/span&gt;&amp;hellip;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;output&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;input&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:Courier New"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; elements must have a required &amp;ldquo;path&amp;rdquo; attribute that points to the input file. It can also have an optional &amp;ldquo;enc&amp;rdquo; attribute that can specify one of the supported .NET text
 encoding names to use to read that input file. It can also have an &amp;ldquo;optional&amp;rdquo; attribute. If no &amp;ldquo;optional&amp;rdquo; attribute is specified, the file is considered required and an error will be thrown if it doesn&amp;rsquo;t exist. But if the value
 of the &amp;ldquo;optional&amp;rdquo; attribute is &amp;ldquo;true,&amp;rdquo; no error will be thrown if the input files doesn&amp;rsquo;t exist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;inputfile.js&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;enc&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;big5&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;optional&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;true&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;rename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:Courier New"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element contains two required attributes: &amp;ldquo;from&amp;rdquo; and &amp;ldquo;to.&amp;rdquo; What this element does is create a renaming pair &amp;ndash; any variables with a name equal to the &amp;ldquo;from&amp;rdquo;
 attribute value will be renamed to the value of the &amp;ldquo;to&amp;rdquo; variable (assuming they are both valid JavaScript identifier names).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;rename &lt;/span&gt;&lt;span style="color:red"&gt;from&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;fromName&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;to&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;toName&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;norename&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:Courier New"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element contains a single required attribute, &amp;ldquo;name&amp;rdquo;. This element specifies that any variables with a name equal to the &amp;ldquo;name&amp;rdquo; attribute value will not be automatically
 renamed. The attribute &amp;ldquo;id&amp;rdquo; may be substituted for &amp;ldquo;name.&amp;rdquo;&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;norename &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;$&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;symbolMap&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;The &lt;span style="font-family:Courier New"&gt;&amp;lt;symbolMap&amp;gt;&lt;/span&gt; element will cause a symbol map to be created for the containing output file. The element contains a single required attribute, &amp;ldquo;path,&amp;rdquo; which specifies the output of the symbol
 map file. By default, the XML source map file format is generated. If the V3 JSON source map format is desired, the &amp;ldquo;name&amp;rdquo; attribute should also be specified, with the value &amp;ldquo;V3&amp;rdquo;. The only two allowed values for the name are &amp;ldquo;v3&amp;rdquo;
 or &amp;ldquo;xml&amp;rdquo; (case-insensitive).&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;symbolMap &lt;/span&gt;&lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;v3&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;outputfile.js.map&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&amp;lt;resource&amp;gt; Elements&lt;/h2&gt;
&lt;p&gt;An &lt;span style="font-family:Courier New"&gt;&amp;lt;output&amp;gt;&lt;/span&gt; element may also contain zero or more &amp;lt;resource&amp;gt; elements that specify .RESX or .RESOURCES files (the RFILE in the mandatory &amp;ldquo;path&amp;rdquo; attribute) from which localized strings can
 be pulled. The object to look for in the sources is specified by the optional &amp;ldquo;name&amp;rdquo; attribute, and must be a valid JavaScript identifier (IDENT); if the &amp;ldquo;name&amp;rdquo; attribute is not specified, the identifier &amp;ldquo;Strings&amp;rdquo; is assumed.
 For example, given the element:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;resource &lt;/span&gt;&lt;span style="color:red"&gt;path&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MYLOC.RESX&lt;/span&gt;&amp;quot; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue"&gt;MyLoc&lt;/span&gt;&amp;quot; &lt;span style="color:blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then whenever the member lookup MyLoc.Foo is encountered in the sources, the string in the file MYLOC.RESX with the name &amp;ldquo;Foo&amp;rdquo; is looked up, and MyLoc.IDENT is replaced with that string literal. If there is no string in MYLOC.RESX with the name
 &amp;ldquo;Foo&amp;rdquo;, then the member lookup is replaced with an empty string literal.&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;XML Naming File&lt;/h1&gt;
&lt;pre&gt;&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:12px"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:12px"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;rename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;from&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;to&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="background-color:#f0f0f0; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:12px"&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;norename&lt;/span&gt; &lt;span style="color:#ff0000"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff"&gt;&amp;quot;IDENT&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="background-color:#ffffff; margin:0em; width:100%; font-family:consolas,'Courier New',courier,monospace; font-size:12px"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;root&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;p&gt;This file can be used with the &lt;span style="font-family:Courier New"&gt;&amp;ndash;rename&lt;/span&gt; switch of the EXE program. The root element can contain zero or more
&lt;span style="font-family:Courier New"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; elements, and zero or more
&lt;span style="font-family:Courier New"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; elements.&amp;nbsp; The
&lt;span style="font-family:Courier New"&gt;&amp;lt;rename&amp;gt;&lt;/span&gt; element specifies identifier names in the source (the IDENT in the mandatory &amp;ldquo;from&amp;rdquo; attribute) that should be renamed (to the IDENT in the mandatory &amp;ldquo;to&amp;rdquo; attribute). The
&lt;span style="font-family:Courier New"&gt;&amp;lt;norename&amp;gt;&lt;/span&gt; element specifies certain identifiers (the IDENT in the mandatory &amp;ldquo;id&amp;rdquo; attribute) which should not be automatically renamed.
&lt;span style="font-family:Courier New"&gt;IDENT&lt;/span&gt; is always a valid case-sensitive JavaScript identifier.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>ronlo</author><pubDate>Tue, 07 May 2013 23:43:45 GMT</pubDate><guid isPermaLink="false">Updated Wiki: XML File Formats 20130507114345P</guid></item></channel></rss>