本文整理匯總了C#中System.Xml.Xsl.Compiler.ParseQNameListAttribute方法的典型用法代碼示例。如果您正苦於以下問題:C# Compiler.ParseQNameListAttribute方法的具體用法?C# Compiler.ParseQNameListAttribute怎麽用?C# Compiler.ParseQNameListAttribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Xml.Xsl.Compiler
的用法示例。
在下文中一共展示了Compiler.ParseQNameListAttribute方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Compile
protected override void Compile (Compiler c)
{
if (c.Debugger != null)
c.Debugger.DebugCompile (c.Input);
this.nsDecls = c.GetNamespacesToCopy ();
if (nsDecls.Count == 0)
nsDecls = null;
c.CheckExtraAttributes ("copy", "use-attribute-sets");
useAttributeSets = c.ParseQNameListAttribute ("use-attribute-sets");
if (!c.Input.MoveToFirstChild ()) return;
children = c.CompileTemplateContent();
c.Input.MoveToParent ();
}
示例2: Compile
protected override void Compile (Compiler c)
{
if (c.Debugger != null)
c.Debugger.DebugCompile (this.DebugInput);
prefix = c.Input.Prefix;
string alias = c.CurrentStylesheet.GetActualPrefix (prefix);
if (alias != prefix) {
prefix = alias;
nsUri = c.Input.GetNamespace (alias);
}
else
nsUri = c.Input.NamespaceURI;
this.localname = c.Input.LocalName;
this.useAttributeSets = c.ParseQNameListAttribute ("use-attribute-sets", XsltNamespace);
this.nsDecls = c.GetNamespacesToCopy ();
if (nsDecls.Count == 0) nsDecls = null;
this.isEmptyElement = c.Input.IsEmptyElement;
if (c.Input.MoveToFirstAttribute ())
{
attrs = new ArrayList ();
do {
if (c.Input.NamespaceURI == XsltNamespace)
continue; //already handled
attrs.Add (new XslLiteralAttribute (c));
} while (c.Input.MoveToNextAttribute());
c.Input.MoveToParent ();
}
if (!c.Input.MoveToFirstChild ()) return;
children = c.CompileTemplateContent ();
c.Input.MoveToParent ();
}
示例3: Compile
protected override void Compile (Compiler c)
{
if (c.Debugger != null)
c.Debugger.DebugCompile (c.Input);
c.CheckExtraAttributes ("element", "name", "namespace", "use-attribute-sets");
name = c.ParseAvtAttribute ("name");
ns = c.ParseAvtAttribute ("namespace");
nsDecls = c.GetNamespacesToCopy ();
calcName = XslAvt.AttemptPreCalc (ref name);
if (calcName != null) {
int colonAt = calcName.IndexOf (':');
if (colonAt == 0)
throw new XsltCompileException ("Invalid name attribute", null, c.Input);
calcPrefix = colonAt < 0 ? String.Empty : calcName.Substring (0, colonAt);
if (colonAt > 0)
calcName = calcName.Substring (colonAt + 1);
try {
XmlConvert.VerifyNCName (calcName);
if (calcPrefix != String.Empty)
XmlConvert.VerifyNCName (calcPrefix);
} catch (XmlException ex) {
throw new XsltCompileException ("Invalid name attribute", ex, c.Input);
}
if (ns == null) {
calcNs = c.Input.GetNamespace (calcPrefix);
if (calcPrefix != String.Empty && calcNs == String.Empty)
throw new XsltCompileException ("Invalid name attribute", null, c.Input);
}
} else if (ns != null)
calcNs = XslAvt.AttemptPreCalc (ref ns);
useAttributeSets = c.ParseQNameListAttribute ("use-attribute-sets");
isEmptyElement = c.Input.IsEmptyElement;
if (c.Input.MoveToFirstChild ()) {
value = c.CompileTemplateContent (XPathNodeType.Element);
c.Input.MoveToParent ();
}
}