本文整理汇总了C#中System.Xml.Xsl.Compiler.CreateXmlQName方法的典型用法代码示例。如果您正苦于以下问题:C# Compiler.CreateXmlQName方法的具体用法?C# Compiler.CreateXmlQName怎么用?C# Compiler.CreateXmlQName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.Xsl.Compiler
的用法示例。
在下文中一共展示了Compiler.CreateXmlQName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CompileAttribute
internal override bool CompileAttribute(Compiler compiler) {
string name = compiler.Input.LocalName;
string value = compiler.Input.Value;
if (Keywords.Equals(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 (Keywords.Equals(name, compiler.Atoms.Version)) {
if (compiler.Stylesheetid <= this.versionSId) {
this.version = value;
this.versionSId = compiler.Stylesheetid;
}
}
else if (Keywords.Equals(name, compiler.Atoms.Encoding)) {
if (compiler.Stylesheetid <= this.encodingSId) {
try {
this.encoding = System.Text.Encoding.GetEncoding(value);
this.encodingSId = compiler.Stylesheetid;
}catch {}
Debug.Assert(this.encoding != null);
}
}
else if (Keywords.Equals(name, compiler.Atoms.OmitXmlDeclaration)) {
if (compiler.Stylesheetid <= this.omitXmlDeclSId) {
this.omitXmlDecl = compiler.GetYesNo(value);
this.omitXmlDeclSId = compiler.Stylesheetid;
}
}
else if (Keywords.Equals(name, compiler.Atoms.Standalone)) {
if (compiler.Stylesheetid <= this.standaloneSId) {
this.standalone = compiler.GetYesNo(value);
this.standaloneSId = compiler.Stylesheetid;
}
}
else if (Keywords.Equals(name, compiler.Atoms.DoctypePublic)) {
if (compiler.Stylesheetid <= this.doctypePublicSId) {
this.doctypePublic = value;
this.doctypePublicSId = compiler.Stylesheetid;
}
}
else if (Keywords.Equals(name, compiler.Atoms.DoctypeSystem)) {
if (compiler.Stylesheetid <= this.doctypeSystemSId) {
this.doctypeSystem = value;
this.doctypeSystemSId = compiler.Stylesheetid;
}
}
else if (Keywords.Equals(name, compiler.Atoms.Indent)) {
if (compiler.Stylesheetid <= this.indentSId) {
this.indent = compiler.GetYesNo(value);
this.indentSId = compiler.Stylesheetid;
}
}
else if (Keywords.Equals(name, compiler.Atoms.MediaType)) {
if (compiler.Stylesheetid <= this.mediaTypeSId) {
this.mediaType = value;
this.mediaTypeSId = compiler.Stylesheetid;
}
}
else if (Keywords.Equals(name, compiler.Atoms.CdataSectionElements)) {
string[] qnames = Compiler.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;
}