System.Xml.Xsl.XsltOld.SequentialOutput.WriteHtmlAttributeValue C# (CSharp) Method

WriteHtmlAttributeValue() private method

private WriteHtmlAttributeValue ( string value ) : void
value string
return void
        private void WriteHtmlAttributeValue(string value) {
            Debug.Assert(value != null);

            int length = value.Length;
            int i = 0;
            while(i < length) {
                char ch = value[i];
                i ++;
                switch (ch) {
                case '&':
                    if(i != length && value[i] == '{') { // &{ hasn't to be encoded in HTML output.
                        Write(ch);
                    }
                    else {
                        Write(s_EnAmpersand);
                    }
                    break;
                case '"':
                    Write(s_EnQuote);
                    break;
                default:
                    Write(ch);
                    break;
                }
            }
        }