322 references to XslFlags
System.Data.SqlXml (322)
System\Xml\Xsl\Xslt\Focus.cs (4)
92
public void StartFocus(IList<QilNode> args,
XslFlags
flags) {
95
if ((flags &
XslFlags
.Current) != 0) {
99
if ((flags &
XslFlags
.Position) != 0) {
103
if ((flags &
XslFlags
.Last) != 0) {
System\Xml\Xsl\Xslt\QilGenerator.cs (35)
357
switch (var.Flags &
XslFlags
.TypeFilter) {
358
case
XslFlags
.String : return T.StringX;;
359
case
XslFlags
.Number : return T.DoubleX;
360
case
XslFlags
.Boolean : return T.BooleanX;
361
case
XslFlags
.Node : return T.NodeNotRtf;
362
case
XslFlags
.Nodeset : return T.NodeNotRtfS;
363
case
XslFlags
.Rtf : return T.Node;
364
case
XslFlags
.Node |
XslFlags
.Rtf : return T.Node;
365
case
XslFlags
.Node |
XslFlags
.Nodeset : return T.NodeNotRtfS;
366
case
XslFlags
.Nodeset |
XslFlags
.Rtf : return T.NodeS;
367
case
XslFlags
.Node |
XslFlags
.Nodeset |
XslFlags
.Rtf : return T.NodeS;
419
XslFlags
flags = !IsDebug ? tmpl.Flags :
XslFlags
.FullFocus;
422
if ((flags &
XslFlags
.Current) != 0) {
425
if ((flags &
XslFlags
.Position) != 0) {
428
if ((flags &
XslFlags
.Last) != 0) {
463
if ((xslPar.DefValueFlags &
XslFlags
.HasCalls) == 0) {
484
xslPar.Flags |= (template.Flags &
XslFlags
.FocusFilter);
486
f.Boolean((xslPar.DefValueFlags &
XslFlags
.SideEffects) != 0),
516
f.Boolean((tmpl.Flags &
XslFlags
.SideEffects) != 0),
561
funcFocus.StartFocus(tmpl.Function.Arguments, !IsDebug ? tmpl.Flags :
XslFlags
.FullFocus);
2120
private IList<XslNode> AddRemoveImplicitArgs(IList<XslNode> args,
XslFlags
flags) {
2123
flags =
XslFlags
.FullFocus;
2125
if ((flags &
XslFlags
.FocusFilter) != 0) {
2130
if ((flags &
XslFlags
.Current ) != 0) { SetArg(args, pos ++, nameCurrent , GetCurrentNode ()); }
2131
if ((flags &
XslFlags
.Position) != 0) { SetArg(args, pos ++, namePosition, GetCurrentPosition()); }
2132
if ((flags &
XslFlags
.Last ) != 0) { SetArg(args, pos ++, nameLast , GetLastPosition ()); }
2187
XslFlags
flags; {
2191
flags |=
XslFlags
.Current; // Due to recursive nature of Apply(Templates/Imports) we will need current node any way
2236
f.Boolean((flags &
XslFlags
.SideEffects) != 0),
System\Xml\Xsl\Xslt\Stylesheet.cs (2)
23
public Dictionary<QilName,
XslFlags
> ModeFlags = new Dictionary<QilName,
XslFlags
>();
System\Xml\Xsl\Xslt\XslAst.cs (2)
83
public
XslFlags
Flags;
249
public
XslFlags
DefValueFlags;
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (270)
23
internal class XslAstAnalyzer : XslVisitor<
XslFlags
> {
89
public void PropagateFlag(
XslFlags
flag) {
92
v.Flags &= ~
XslFlags
.Stop;
96
if ((v.Flags &
XslFlags
.Stop) == 0) {
104
private void DepthFirstSearch(V v,
XslFlags
flag) {
105
Debug.Assert((v.Flags &
XslFlags
.Stop) == 0, "Already visited this vertex");
106
v.Flags |= (flag |
XslFlags
.Stop);
108
if ((u.Flags &
XslFlags
.Stop) == 0) {
130
public
XslFlags
Analyze(Compiler compiler) {
146
par.Flags |=
XslFlags
.AnyType;
153
XslFlags
result =
XslFlags
.None;
174
if ((par.Flags &
XslFlags
.MayBeDefault) != 0) {
182
for (int flag = (int)
XslFlags
.Rtf; flag != 0; flag >>= 1) {
183
dataFlow.PropagateFlag((
XslFlags
)flag);
196
if ((result &
XslFlags
.Current) != 0) {
197
revCall0Graph.PropagateFlag(
XslFlags
.Current);
199
if ((result &
XslFlags
.Position) != 0) {
200
revCall0Graph.PropagateFlag(
XslFlags
.Position);
202
if ((result &
XslFlags
.Last) != 0) {
203
revCall0Graph.PropagateFlag(
XslFlags
.Last);
205
if ((result &
XslFlags
.SideEffects) != 0) {
231
private void FillModeFlags(Dictionary<QilName,
XslFlags
> parentModeFlags, Stylesheet sheet) {
238
foreach (KeyValuePair<QilName,
XslFlags
> modeFlag in sheet.ModeFlags) {
239
XslFlags
modeFlags;
248
XslFlags
templateFlags = tmpl.Flags & (
XslFlags
.FocusFilter |
XslFlags
.SideEffects);
250
XslFlags
modeFlags;
330
protected override
XslFlags
Visit(XslNode node) {
332
XslFlags
result = base.Visit(node);
340
(result &
XslFlags
.TypeFilter & ~
XslFlags
.Rtf) == 0,
346
protected override
XslFlags
VisitChildren(XslNode node) {
347
XslFlags
result =
XslFlags
.None;
355
protected override
XslFlags
VisitAttributeSet(AttributeSet node) {
362
protected override
XslFlags
VisitTemplate(Template node) {
369
protected override
XslFlags
VisitApplyImports(XslNode node) {
374
return
XslFlags
.HasCalls |
XslFlags
.Current |
XslFlags
.Rtf;
377
protected override
XslFlags
VisitApplyTemplates(XslNode node) {
379
XslFlags
result = ProcessExpr(node.Select);
394
modePar.Flags |= instr.Flags &
XslFlags
.TypeFilter;
403
return
XslFlags
.HasCalls |
XslFlags
.Rtf | result;
406
protected override
XslFlags
VisitAttribute(NodeCtor node) {
408
XslFlags
.Rtf |
415
protected override
XslFlags
VisitCallTemplate(XslNode node) {
416
XslFlags
result =
XslFlags
.None;
477
par.Flags |= found.Flags &
XslFlags
.TypeFilter;
481
par.Flags |=
XslFlags
.MayBeDefault;
486
return
XslFlags
.HasCalls |
XslFlags
.Rtf | result;
491
protected override
XslFlags
VisitComment(XslNode node) {
492
return
XslFlags
.Rtf | VisitChildren(node);
495
protected override
XslFlags
VisitCopy(XslNode node) {
498
return
XslFlags
.Current |
XslFlags
.Rtf | VisitChildren(node);
501
protected override
XslFlags
VisitCopyOf(XslNode node) {
502
return
XslFlags
.Rtf | ProcessExpr(node.Select);
505
protected override
XslFlags
VisitElement(NodeCtor node) {
509
XslFlags
.Rtf |
516
protected override
XslFlags
VisitError(XslNode node) {
517
return (VisitChildren(node) & ~
XslFlags
.TypeFilter) |
XslFlags
.SideEffects;
520
protected override
XslFlags
VisitForEach(XslNode node) {
521
XslFlags
result = ProcessExpr(node.Select);
528
result |= Visit(child) & ~
XslFlags
.FocusFilter;
535
protected override
XslFlags
VisitIf(XslNode node) {
549
protected override
XslFlags
VisitLiteralAttribute(XslNode node) {
551
XslFlags
.Rtf |
557
protected override
XslFlags
VisitLiteralElement(XslNode node) {
558
return
XslFlags
.Rtf | VisitChildren(node);
561
protected override
XslFlags
VisitMessage(XslNode node) {
562
return (VisitChildren(node) & ~
XslFlags
.TypeFilter) |
XslFlags
.SideEffects;
567
protected override
XslFlags
VisitNumber(Number node) {
569
XslFlags
.Rtf |
572
(node.Value != null ? ProcessExpr(node.Value) :
XslFlags
.Current) |
583
protected override
XslFlags
VisitPI(XslNode node) {
585
XslFlags
.Rtf |
591
protected override
XslFlags
VisitSort(Sort node) {
595
ProcessExpr(node.Select) & ~
XslFlags
.FocusFilter |
603
protected override
XslFlags
VisitText(Text node) {
604
return
XslFlags
.Rtf | VisitChildren(node);
607
protected override
XslFlags
VisitUseAttributeSet(XslNode node) {
620
return
XslFlags
.HasCalls |
XslFlags
.Rtf;
623
protected override
XslFlags
VisitValueOf(XslNode node) {
624
return
XslFlags
.Rtf | ProcessExpr(node.Select);
627
protected override
XslFlags
VisitValueOfDoe(XslNode node) {
628
return
XslFlags
.Rtf | ProcessExpr(node.Select);
631
protected override
XslFlags
VisitParam(VarPar node) {
636
node.Flags |=
XslFlags
.MayBeDefault;
647
return node.DefValueFlags & ~
XslFlags
.TypeFilter;
650
protected override
XslFlags
VisitVariable(VarPar node) {
652
return node.Flags & ~
XslFlags
.TypeFilter;
655
protected override
XslFlags
VisitWithParam(VarPar node) {
657
return node.Flags & ~
XslFlags
.TypeFilter;
660
private
XslFlags
ProcessVarPar(VarPar node) {
661
XslFlags
result;
672
result = xpathAnalyzer.Analyze(node.Select) | VisitChildren(node) |
XslFlags
.AnyType;
682
result =
XslFlags
.Rtf | VisitChildren(node);
685
result =
XslFlags
.String;
692
private
XslFlags
ProcessExpr(string expr) {
693
return xpathAnalyzer.Analyze(expr) & ~
XslFlags
.TypeFilter;
697
private
XslFlags
ProcessAvt(string avt) {
698
return xpathAnalyzer.AnalyzeAvt(avt) & ~
XslFlags
.TypeFilter;
702
private
XslFlags
ProcessPattern(string pattern) {
704
return xpathAnalyzer.Analyze(pattern) & ~
XslFlags
.TypeFilter & ~
XslFlags
.FocusFilter;
724
t.Flags &= ~
XslFlags
.Stop;
727
t.Flags &= ~
XslFlags
.Stop;
731
if ((t.Flags &
XslFlags
.Stop) == 0) {
732
if ((t.Flags &
XslFlags
.SideEffects) != 0) {
738
if ((t.Flags &
XslFlags
.Stop) == 0) {
739
if ((t.Flags &
XslFlags
.SideEffects) != 0) {
747
Debug.Assert((t.Flags &
XslFlags
.Stop) == 0, "Already visited this vertex");
748
t.Flags |= (
XslFlags
.SideEffects |
XslFlags
.Stop);
751
if ((u.Flags &
XslFlags
.Stop) == 0) {
754
Debug.Assert((u.Flags &
XslFlags
.SideEffects) ==
XslFlags
.SideEffects, "Flag was not set on an adjacent vertex");
757
if ((u.Flags &
XslFlags
.Stop) == 0) {
760
Debug.Assert((u.Flags &
XslFlags
.SideEffects) ==
XslFlags
.SideEffects, "Flag was not set on an adjacent vertex");
769
if ((u.Flags &
XslFlags
.Stop) == 0) {
772
Debug.Assert((u.Flags &
XslFlags
.SideEffects) ==
XslFlags
.SideEffects, "Flag was not set on an adjacent vertex");
785
internal class XPathAnalyzer : IXPathBuilder<
XslFlags
> {
786
private XPathParser<
XslFlags
> xpathParser = new XPathParser<
XslFlags
>();
806
public
XslFlags
Analyze(string xpathExpr) {
809
return
XslFlags
.None;
815
XslFlags
result = xpathParser.Parse(scanner, this, LexKind.Eof);
817
result |=
XslFlags
.Current;
821
return
XslFlags
.AnyType |
XslFlags
.FullFocus;
825
public
XslFlags
AnalyzeAvt(string source) {
828
return
XslFlags
.None;
832
XslFlags
result =
XslFlags
.None;
851
result |=
XslFlags
.Current;
853
return result & ~
XslFlags
.TypeFilter;
855
return
XslFlags
.FullFocus;
881
public virtual
XslFlags
EndBuild(
XslFlags
result) {
885
public virtual
XslFlags
String(string value) {
887
return
XslFlags
.String;
890
public virtual
XslFlags
Number(double value) {
892
return
XslFlags
.Number;
895
private static
XslFlags
[] OperatorType = {
896
/*Unknown */
XslFlags
.AnyType,
897
/*Or */
XslFlags
.Boolean,
898
/*And */
XslFlags
.Boolean,
899
/*Eq */
XslFlags
.Boolean,
900
/*Ne */
XslFlags
.Boolean,
901
/*Lt */
XslFlags
.Boolean,
902
/*Le */
XslFlags
.Boolean,
903
/*Gt */
XslFlags
.Boolean,
904
/*Ge */
XslFlags
.Boolean,
905
/*Plus */
XslFlags
.Number ,
906
/*Minus */
XslFlags
.Number ,
907
/*Multiply */
XslFlags
.Number ,
908
/*Divide */
XslFlags
.Number ,
909
/*Modulo */
XslFlags
.Number ,
910
/*UnaryMinus*/
XslFlags
.Number ,
911
/*Union */
XslFlags
.Nodeset,
914
public virtual
XslFlags
Operator(XPathOperator op,
XslFlags
left,
XslFlags
right) {
917
XslFlags
result = (left | right) & ~
XslFlags
.TypeFilter;
921
public virtual
XslFlags
Axis(XPathAxis xpathAxis, XPathNodeType nodeType, string prefix, string name) {
924
return
XslFlags
.Current |
XslFlags
.Node;
926
return
XslFlags
.Current |
XslFlags
.Nodeset;
931
public virtual
XslFlags
JoinStep(
XslFlags
left,
XslFlags
right) {
933
return (left & ~
XslFlags
.TypeFilter) |
XslFlags
.Nodeset; // "ex:Foo(position())/Bar"
937
public virtual
XslFlags
Predicate(
XslFlags
nodeset,
XslFlags
predicate, bool isReverseStep) {
939
return (nodeset & ~
XslFlags
.TypeFilter) |
XslFlags
.Nodeset | (predicate &
XslFlags
.SideEffects); // "ex:Foo(position())[Bar]"
942
public virtual
XslFlags
Variable(string prefix, string name) {
946
return
XslFlags
.AnyType;
948
return
XslFlags
.None;
951
public virtual
XslFlags
Function(string prefix, string name, IList<
XslFlags
> args) {
954
XslFlags
argsFlags =
XslFlags
.None;
955
foreach (
XslFlags
t in args) {
959
XslFlags
funcFlags =
XslFlags
.None;
977
funcFlags |=
XslFlags
.Current;
985
funcFlags |=
XslFlags
.Current;
992
case "node-set": funcFlags =
XslFlags
.Nodeset; break;
993
case "string-compare": funcFlags =
XslFlags
.Number; break;
994
case "utc": funcFlags =
XslFlags
.String; break;
995
case "format-date": funcFlags =
XslFlags
.String; break;
996
case "format-time": funcFlags =
XslFlags
.String; break;
997
case "local-name": funcFlags =
XslFlags
.String; break;
998
case "namespace-uri": funcFlags =
XslFlags
.String |
XslFlags
.Current; break;
999
case "number": funcFlags =
XslFlags
.Number; break;
1003
case "node-set": funcFlags =
XslFlags
.Nodeset; break;
1004
case "object-type": funcFlags =
XslFlags
.String; break;
1008
if (funcFlags ==
XslFlags
.None) {
1010
funcFlags =
XslFlags
.AnyType;
1016
funcFlags =
XslFlags
.String;
1018
funcFlags =
XslFlags
.Number;
1020
funcFlags =
XslFlags
.Boolean;
1022
funcFlags =
XslFlags
.Node;
1024
funcFlags =
XslFlags
.Nodeset;
1026
funcFlags =
XslFlags
.AnyType;
1028
funcFlags =
XslFlags
.Nodeset;
1034
funcFlags |=
XslFlags
.SideEffects;
1038
return (argsFlags & ~
XslFlags
.TypeFilter) | funcFlags;
1042
private static
XslFlags
[] XPathFunctionFlags = {
1043
/*Last */
XslFlags
.Number |
XslFlags
.Last,
1044
/*Position */
XslFlags
.Number |
XslFlags
.Position,
1045
/*Count */
XslFlags
.Number,
1046
/*LocalName */
XslFlags
.String, // | XslFlags.Current if 0 args
1047
/*NamespaceUri */
XslFlags
.String, // | XslFlags.Current if 0 args
1048
/*Name */
XslFlags
.String, // | XslFlags.Current if 0 args
1049
/*String */
XslFlags
.String, // | XslFlags.Current if 0 args
1050
/*Number */
XslFlags
.Number, // | XslFlags.Current if 0 args
1051
/*Boolean */
XslFlags
.Boolean,
1052
/*True */
XslFlags
.Boolean,
1053
/*False */
XslFlags
.Boolean,
1054
/*Not */
XslFlags
.Boolean,
1055
/*Id */
XslFlags
.Nodeset |
XslFlags
.Current,
1056
/*Concat */
XslFlags
.String,
1057
/*StartsWith */
XslFlags
.Boolean,
1058
/*Contains */
XslFlags
.Boolean,
1059
/*SubstringBefore */
XslFlags
.String,
1060
/*SubstringAfter */
XslFlags
.String,
1061
/*Substring */
XslFlags
.String,
1062
/*StringLength */
XslFlags
.Number, // | XslFlags.Current if 0 args
1063
/*Normalize */
XslFlags
.String, // | XslFlags.Current if 0 args
1064
/*Translate */
XslFlags
.String,
1065
/*Lang */
XslFlags
.Boolean |
XslFlags
.Current,
1066
/*Sum */
XslFlags
.Number,
1067
/*Floor */
XslFlags
.Number,
1068
/*Ceiling */
XslFlags
.Number,
1069
/*Round */
XslFlags
.Number,
1074
private static
XslFlags
[] XsltFunctionFlags = {
1075
/*Current */
XslFlags
.Node, // xsltCurrentNeeded = true
1076
/*Document */
XslFlags
.Nodeset,
1077
/*Key */
XslFlags
.Nodeset |
XslFlags
.Current,
1078
/*FormatNumber */
XslFlags
.String,
1079
/*UnparsedEntityUri */
XslFlags
.String, // | XslFlags.Current if it is implemented
1080
/*GenerateId */
XslFlags
.String, // | XslFlags.Current if 0 args
1081
/*SystemProperty */
XslFlags
.String |
XslFlags
.Number,
1082
/*ElementAvailable */
XslFlags
.Boolean,
1083
/*FunctionAvailable */
XslFlags
.Boolean,
System\Xml\Xsl\Xslt\XslFlags.cs (9)
21
AnyType =
XslFlags
.String |
XslFlags
.Number |
XslFlags
.Boolean |
XslFlags
.Node |
XslFlags
.Nodeset |
XslFlags
.Rtf,
29
FullFocus =
XslFlags
.Current |
XslFlags
.Position |
XslFlags
.Last,