internal override bool CompileAttribute(Compiler compiler)
{
string name = compiler.Input.LocalName;
string value = compiler.Input.Value;
if (Ref.Equal(name, compiler.Atoms.Method))
{
if (compiler.Stylesheetid <= this.methodSId)
{
this.method = ParseOutputMethod(value, compiler);
this.methodSId = compiler.Stylesheetid;
if (this.indentSId == int.MaxValue)
{
this.indent = (this.method == OutputMethod.Html);
}
}
}
else if (Ref.Equal(name, compiler.Atoms.Version))
{
if (compiler.Stylesheetid <= this.versionSId)
{
this.version = value;
this.versionSId = compiler.Stylesheetid;
}
}
else if (Ref.Equal(name, compiler.Atoms.Encoding))
{
if (compiler.Stylesheetid <= this.encodingSId)
{
try {
this.encoding = System.Text.Encoding.GetEncoding(value);
this.encodingSId = compiler.Stylesheetid;
}
catch (System.NotSupportedException) {}
catch (System.ArgumentException) {}
Debug.Assert(this.encoding != null);
}
}
else if (Ref.Equal(name, compiler.Atoms.OmitXmlDeclaration))
{
if (compiler.Stylesheetid <= this.omitXmlDeclSId)
{
this.omitXmlDecl = compiler.GetYesNo(value);
this.omitXmlDeclSId = compiler.Stylesheetid;
}
}
else if (Ref.Equal(name, compiler.Atoms.Standalone))
{
if (compiler.Stylesheetid <= this.standaloneSId)
{
this.standalone = compiler.GetYesNo(value);
this.standaloneSId = compiler.Stylesheetid;
}
}
else if (Ref.Equal(name, compiler.Atoms.DocTypePublic))
{
if (compiler.Stylesheetid <= this.doctypePublicSId)
{
this.doctypePublic = value;
this.doctypePublicSId = compiler.Stylesheetid;
}
}
else if (Ref.Equal(name, compiler.Atoms.DocTypeSystem))
{
if (compiler.Stylesheetid <= this.doctypeSystemSId)
{
this.doctypeSystem = value;
this.doctypeSystemSId = compiler.Stylesheetid;
}
}
else if (Ref.Equal(name, compiler.Atoms.Indent))
{
if (compiler.Stylesheetid <= this.indentSId)
{
this.indent = compiler.GetYesNo(value);
this.indentSId = compiler.Stylesheetid;
}
}
else if (Ref.Equal(name, compiler.Atoms.MediaType))
{
if (compiler.Stylesheetid <= this.mediaTypeSId)
{
this.mediaType = value;
this.mediaTypeSId = compiler.Stylesheetid;
}
}
else if (Ref.Equal(name, compiler.Atoms.CDataSectionElements))
{
string[] qnames = XmlConvert.SplitString(value);
if (this.cdataElements == null)
{
this.cdataElements = new Hashtable(qnames.Length);
}
for (int i = 0; i < qnames.Length; i++)
{
XmlQualifiedName qname = compiler.CreateXmlQName(qnames[i]);
this.cdataElements[qname] = qname;
}
}
else
{
return(false);
}
return(true);
}