186 references to XslNodeType
System.Private.Xml (186)
System\Xml\Xsl\Xslt\Compiler.cs (3)
163
Debug.Assert(var.NodeType ==
XslNodeType
.Variable || var.NodeType ==
XslNodeType
.Param);
166
if (var.NodeType ==
XslNodeType
.Variable)
System\Xml\Xsl\Xslt\QilGenerator.cs (54)
479
Debug.Assert(tmpl.NodeType ==
XslNodeType
.AttributeSet || tmpl.NodeType ==
XslNodeType
.Template);
508
Debug.Assert(tmpl.NodeType ==
XslNodeType
.Template);
515
if (node.NodeType ==
XslNodeType
.Text)
521
if (node.NodeType ==
XslNodeType
.Param)
704
XslNodeType
nodeType = node.NodeType;
705
if (nodeType ==
XslNodeType
.Param)
714
case
XslNodeType
.ApplyImports: result = CompileApplyImports(node); break;
715
case
XslNodeType
.ApplyTemplates: result = CompileApplyTemplates((XslNodeEx)node); break;
716
case
XslNodeType
.Attribute: result = CompileAttribute((NodeCtor)node); break;
717
case
XslNodeType
.CallTemplate: result = CompileCallTemplate((XslNodeEx)node); break;
718
case
XslNodeType
.Choose: result = CompileChoose(node); break;
719
case
XslNodeType
.Comment: result = CompileComment(node); break;
720
case
XslNodeType
.Copy: result = CompileCopy(node); break;
721
case
XslNodeType
.CopyOf: result = CompileCopyOf(node); break;
722
case
XslNodeType
.Element: result = CompileElement((NodeCtor)node); break;
723
case
XslNodeType
.Error: result = CompileError(node); break;
724
case
XslNodeType
.ForEach: result = CompileForEach((XslNodeEx)node); break;
725
case
XslNodeType
.If: result = CompileIf(node); break;
726
case
XslNodeType
.List: result = CompileList(node); break;
727
case
XslNodeType
.LiteralAttribute: result = CompileLiteralAttribute(node); break;
728
case
XslNodeType
.LiteralElement: result = CompileLiteralElement(node); break;
729
case
XslNodeType
.Message: result = CompileMessage(node); break;
730
case
XslNodeType
.Nop: result = CompileNop(); break;
731
case
XslNodeType
.Number: result = CompileNumber((Number)node); break;
734
case
XslNodeType
.PI: result = CompilePI(node); break;
737
case
XslNodeType
.Text: result = CompileText((Text)node); break;
738
case
XslNodeType
.UseAttributeSet: result = CompileUseAttributeSet(node); break;
739
case
XslNodeType
.ValueOf: result = CompileValueOf(node); break;
740
case
XslNodeType
.ValueOfDoe: result = CompileValueOfDoe(node); break;
741
case
XslNodeType
.Variable: result = CompileVariable(node); break;
754
if (nodeType !=
XslNodeType
.LiteralAttribute && nodeType !=
XslNodeType
.UseAttributeSet)
760
if (nodeType ==
XslNodeType
.Variable)
1179
Debug.Assert(withParam.NodeType ==
XslNodeType
.WithParam);
1215
Debug.Assert(node.NodeType ==
XslNodeType
.ApplyImports);
1417
Debug.Assert(when.NodeType ==
XslNodeType
.If || when.NodeType ==
XslNodeType
.Otherwise);
1419
if (when.NodeType ==
XslNodeType
.Otherwise)
1460
Debug.Assert(node.NodeType ==
XslNodeType
.Variable);
1470
Debug.Assert(node.NodeType ==
XslNodeType
.Variable || node.NodeType ==
XslNodeType
.Param || node.NodeType ==
XslNodeType
.WithParam);
1508
Debug.Assert(withParam.NodeType ==
XslNodeType
.WithParam);
1726
Debug.Assert(sort.NodeType ==
XslNodeType
.Sort);
2223
Debug.Assert(varPar.NodeType ==
XslNodeType
.Variable || varPar.NodeType ==
XslNodeType
.Param);
2226
if (varPar.NodeType ==
XslNodeType
.Variable)
2259
Debug.Assert(varPar.NodeType ==
XslNodeType
.Variable || varPar.NodeType ==
XslNodeType
.Param);
2516
node.NodeType ==
XslNodeType
.ApplyTemplates && sheet is RootLevel ||
2517
node.NodeType ==
XslNodeType
.ApplyImports && sheet is Stylesheet
2581
Debug.Assert(actualArgs[actArg].NodeType ==
XslNodeType
.WithParam, "All Sorts was removed in CompileSorts()");
2662
Debug.Assert(actualArgs[i].NodeType ==
XslNodeType
.WithParam, "All Sorts was removed in CompileSorts()");
System\Xml\Xsl\Xslt\Stylesheet.cs (2)
86
Debug.Assert(var.NodeType ==
XslNodeType
.Variable || var.NodeType ==
XslNodeType
.Param);
System\Xml\Xsl\Xslt\XslAst.cs (39)
77
public readonly
XslNodeType
NodeType;
86
public XslNode(
XslNodeType
nodeType, QilName? name, object? arg, XslVersion xslVer)
94
public XslNode(
XslNodeType
nodeType)
141
public ProtoTemplate(
XslNodeType
nt, QilName? name, XslVersion xslVer) : base(nt, name, null, xslVer) { }
156
public AttributeSet(QilName name, XslVersion xslVer) : base(
XslNodeType
.AttributeSet, name, xslVer) { }
162
Debug.Assert(node != null && node.NodeType ==
XslNodeType
.List);
181
: base(
XslNodeType
.Template, name, xslVer)
226
public VarPar(
XslNodeType
nt, QilName name, string? select, XslVersion xslVer) : base(nt, name, select, xslVer) { }
237
: base(
XslNodeType
.Sort, null, select, xslVer)
262
: base(
XslNodeType
.Key, name, null, xslVer)
315
XslVersion xslVer) : base(
XslNodeType
.Number, null, null, xslVer)
334
public NodeCtor(
XslNodeType
nt, string nameAvt, string? nsAvt, XslVersion xslVer)
347
: base(
XslNodeType
.Text, null, data, xslVer)
358
public XslNodeEx(
XslNodeType
t, QilName? name, object? arg, ContextInfo ctxInfo, XslVersion xslVer)
365
public XslNodeEx(
XslNodeType
t, QilName? name, object? arg, XslVersion xslVer) : base(t, name, arg, xslVer)
372
public static XslNode XslNode(
XslNodeType
nodeType, QilName? name, string? arg, XslVersion xslVer)
379
return new XslNode(
XslNodeType
.ApplyImports, mode, sheet, xslVer);
384
return new XslNodeEx(
XslNodeType
.ApplyTemplates, mode, select, ctxInfo, xslVer);
390
return new XslNodeEx(
XslNodeType
.ApplyTemplates, mode, /*select:*/null, XslVersion.Current);
395
return new NodeCtor(
XslNodeType
.Attribute, nameAvt, nsAvt, xslVer);
405
return new XslNodeEx(
XslNodeType
.CallTemplate, name, null, ctxInfo, XslVersion.Current);
410
return new XslNode(
XslNodeType
.Choose);
415
return new XslNode(
XslNodeType
.Comment);
420
return new XslNode(
XslNodeType
.Copy);
425
return new XslNode(
XslNodeType
.CopyOf, null, select, xslVer);
430
return new NodeCtor(
XslNodeType
.Element, nameAvt, nsAvt, xslVer);
435
return new XslNode(
XslNodeType
.Error, null, message, XslVersion.Current);
440
return new XslNodeEx(
XslNodeType
.ForEach, null, select, ctxInfo, xslVer);
445
return new XslNode(
XslNodeType
.If, null, test, xslVer);
455
return new XslNode(
XslNodeType
.List);
460
return new XslNode(
XslNodeType
.LiteralAttribute, name, value, xslVer);
465
return new XslNode(
XslNodeType
.LiteralElement, name, null, XslVersion.Current);
470
return new XslNode(
XslNodeType
.Message, null, term, XslVersion.Current);
475
return new XslNode(
XslNodeType
.Nop);
487
return new XslNode(
XslNodeType
.Otherwise);
492
return new XslNode(
XslNodeType
.PI, null, name, xslVer);
517
return new XslNode(
XslNodeType
.UseAttributeSet, name, null, XslVersion.Current);
520
public static VarPar VarPar(
XslNodeType
nt, QilName name, string? select, XslVersion xslVer)
527
return VarPar(
XslNodeType
.WithParam, name, /*select*/null, XslVersion.Current);
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (42)
187
if (instr.NodeType ==
XslNodeType
.Text)
191
if (instr.NodeType !=
XslNodeType
.Param)
307
if (_currentTemplate != null && (node.NodeType ==
XslNodeType
.Variable || node.NodeType ==
XslNodeType
.Param))
362
if (instr.NodeType ==
XslNodeType
.WithParam)
429
Debug.Assert(instr.NodeType ==
XslNodeType
.WithParam);
444
if (instr.NodeType ==
XslNodeType
.Text)
448
if (instr.NodeType !=
XslNodeType
.Param)
534
if (child.NodeType ==
XslNodeType
.Sort)
695
if (node.NodeType !=
XslNodeType
.WithParam)
714
if (_typeDonor != null && node.NodeType !=
XslNodeType
.WithParam)
1298
(1 << (int)
XslNodeType
.Param) |
1299
(1 << (int)
XslNodeType
.Variable) |
1300
(1 << (int)
XslNodeType
.WithParam) |
1301
(1 << (int)
XslNodeType
.ApplyTemplates) |
1302
(1 << (int)
XslNodeType
.CopyOf) |
1303
(1 << (int)
XslNodeType
.ForEach) |
1304
(1 << (int)
XslNodeType
.If) |
1306
(1 << (int)
XslNodeType
.Sort) |
1307
(1 << (int)
XslNodeType
.ValueOf) |
1308
(1 << (int)
XslNodeType
.ValueOfDoe);
1312
(1 << (int)
XslNodeType
.Attribute) |
1313
(1 << (int)
XslNodeType
.Comment) |
1314
(1 << (int)
XslNodeType
.Copy) |
1315
(1 << (int)
XslNodeType
.Element) |
1316
(1 << (int)
XslNodeType
.ForEach) |
1317
(1 << (int)
XslNodeType
.If) | // also used for xsl:when
1318
(1 << (int)
XslNodeType
.Message) |
1319
(1 << (int)
XslNodeType
.Otherwise) |
1320
(1 << (int)
XslNodeType
.Param) |
1321
(1 << (int)
XslNodeType
.PI) |
1322
(1 << (int)
XslNodeType
.Template) |
1323
(1 << (int)
XslNodeType
.Variable) |
1324
(1 << (int)
XslNodeType
.WithParam) |
1325
(1 << (int)
XslNodeType
.LiteralAttribute) |
1326
(1 << (int)
XslNodeType
.LiteralElement);
1329
private static bool NodeTypeTest(
XslNodeType
nodetype, int flags)
1381
if (child.NodeType ==
XslNodeType
.Variable || child.NodeType ==
XslNodeType
.Param)
1385
if (child.NodeType ==
XslNodeType
.Param)
1455
var withparam = AstFactory.VarPar(
XslNodeType
.WithParam, paramname, $"${paramname.QualifiedName}", XslVersion.Current);
1461
var param = AstFactory.VarPar(
XslNodeType
.Param, paramname, null, XslVersion.Current);
System\Xml\Xsl\Xslt\XsltLoader.cs (15)
805
case
XslNodeType
.UseAttributeSet:
816
case
XslNodeType
.List:
1877
return SetInfo(F.XslNode(doe ?
XslNodeType
.ValueOfDoe :
XslNodeType
.ValueOf, null, select, _input.XslVersion),
1915
XslNodeType
nodeType = (
1916
Ref.Equal(localName, _atoms.Variable) ?
XslNodeType
.Variable :
1917
Ref.Equal(localName, _atoms.Param) ?
XslNodeType
.Param :
1918
Ref.Equal(localName, _atoms.WithParam) ?
XslNodeType
.WithParam :
1919
XslNodeType
.Unknown
1921
Debug.Assert(nodeType !=
XslNodeType
.Unknown);
1923
nodeType ==
XslNodeType
.Variable ? _variableAttributes :
1924
nodeType ==
XslNodeType
.Param ? _paramAttributes :
1942
if (nodeType ==
XslNodeType
.Param && _curTemplate == null)
2524
Debug.Assert(withParam.NodeType ==
XslNodeType
.WithParam);
2527
if (node.NodeType ==
XslNodeType
.WithParam && node.Name!.Equals(withParam.Name))
System\Xml\Xsl\Xslt\XslVisitor.cs (31)
13
XslNodeType
.ApplyImports => VisitApplyImports((XslNode)node),
14
XslNodeType
.ApplyTemplates => VisitApplyTemplates((XslNode)node),
15
XslNodeType
.Attribute => VisitAttribute((NodeCtor)node),
16
XslNodeType
.AttributeSet => VisitAttributeSet((AttributeSet)node),
17
XslNodeType
.CallTemplate => VisitCallTemplate((XslNode)node),
18
XslNodeType
.Choose => VisitChoose((XslNode)node),
19
XslNodeType
.Comment => VisitComment((XslNode)node),
20
XslNodeType
.Copy => VisitCopy((XslNode)node),
21
XslNodeType
.CopyOf => VisitCopyOf((XslNode)node),
22
XslNodeType
.Element => VisitElement((NodeCtor)node),
23
XslNodeType
.Error => VisitError((XslNode)node),
24
XslNodeType
.ForEach => VisitForEach((XslNode)node),
25
XslNodeType
.If => VisitIf((XslNode)node),
26
XslNodeType
.Key => VisitKey((Key)node),
27
XslNodeType
.List => VisitList((XslNode)node),
28
XslNodeType
.LiteralAttribute => VisitLiteralAttribute((XslNode)node),
29
XslNodeType
.LiteralElement => VisitLiteralElement((XslNode)node),
30
XslNodeType
.Message => VisitMessage((XslNode)node),
31
XslNodeType
.Nop => VisitNop((XslNode)node),
32
XslNodeType
.Number => VisitNumber((Number)node),
33
XslNodeType
.Otherwise => VisitOtherwise((XslNode)node),
34
XslNodeType
.Param => VisitParam((VarPar)node),
35
XslNodeType
.PI => VisitPI((XslNode)node),
36
XslNodeType
.Sort => VisitSort((Sort)node),
37
XslNodeType
.Template => VisitTemplate((Template)node),
38
XslNodeType
.Text => VisitText((Text)node),
39
XslNodeType
.UseAttributeSet => VisitUseAttributeSet((XslNode)node),
40
XslNodeType
.ValueOf => VisitValueOf((XslNode)node),
41
XslNodeType
.ValueOfDoe => VisitValueOfDoe((XslNode)node),
42
XslNodeType
.Variable => VisitVariable((VarPar)node),
43
XslNodeType
.WithParam => VisitWithParam((VarPar)node),