2 writes to input
System.Data.SqlXml (2)
System\Xml\Xsl\Xslt\XsltLoader.cs (2)
213
input
= new XsltInput(reader, compiler, atoms);
247
input
= prevInput;
355 references to input
System.Data.SqlXml (355)
System\Xml\Xsl\Xslt\XsltLoader.cs (355)
210
XsltInput prevInput =
input
;
241
input
.BuildReaderLineInfo()
254
if (!
input
.FindStylesheetElement()) {
258
Debug.Assert(
input
.NodeType == XmlNodeType.Element);
259
if (
input
.IsXsltNamespace()) {
261
input
.IsKeyword(atoms.Stylesheet) ||
262
input
.IsKeyword(atoms.Transform)
267
input
.SkipNode();
272
input
.Finish();
276
Debug.Assert(!
input
.IsXsltNamespace());
280
curTemplate = f.Template(/*name:*/null, /*match:*/"/", /*mode:*/nullMode, /*priority:*/double.NaN,
input
.XslVersion);
283
input
.CanHaveApplyImports = true;
305
Debug.Assert(
input
.IsXsltNamespace() && (
input
.IsKeyword(atoms.Stylesheet) ||
input
.IsKeyword(atoms.Transform)));
306
ContextInfo ctxInfo =
input
.GetAttributes(stylesheetAttributes);
311
QName parentName =
input
.ElementName;
312
if (
input
.MoveToFirstChild()) {
316
switch (
input
.NodeType) {
318
if (
input
.IsXsltNamespace()) {
319
if (
input
.IsKeyword(atoms.Import)) {
321
ReportError(/*[XT0200]*/Res.Xslt_NotAtTop,
input
.QualifiedName, parentName);
322
input
.SkipNode();
327
} else if (
input
.IsKeyword(atoms.Include)) {
329
} else if (
input
.IsKeyword(atoms.StripSpace)) {
331
} else if (
input
.IsKeyword(atoms.PreserveSpace)) {
333
} else if (
input
.IsKeyword(atoms.Output)) {
335
} else if (
input
.IsKeyword(atoms.Key)) {
337
} else if (
input
.IsKeyword(atoms.DecimalFormat)) {
339
} else if (
input
.IsKeyword(atoms.NamespaceAlias)) {
341
} else if (
input
.IsKeyword(atoms.AttributeSet)) {
343
} else if (
input
.IsKeyword(atoms.Variable)) {
345
} else if (
input
.IsKeyword(atoms.Param)) {
347
} else if (
input
.IsKeyword(atoms.Template)) {
358
input
.GetVersionAttribute();
359
if (!
input
.ForwardCompatibility) {
360
ReportError(/*[XT_003]*/Res.Xslt_UnexpectedElement,
input
.QualifiedName, parentName);
362
input
.SkipNode();
364
} else if (
input
.IsNs(atoms.UrnMsxsl) &&
input
.IsKeyword(atoms.Script)) {
367
if (
input
.IsNullNamespace()) {
368
ReportError(/*[XT0130]*/Res.Xslt_NullNsAtTopLevel,
input
.LocalName);
371
input
.SkipNode();
380
Debug.Assert(
input
.NodeType == XmlNodeType.Text);
384
} while (
input
.MoveToNextSibling());
395
ContextInfo ctxInfo =
input
.GetAttributes(importIncludeAttributes);
397
if (
input
.MoveToXsltAttribute(0, "href")) {
399
Uri uri = ResolveUri(
input
.Value,
input
.BaseUri);
403
ReportError(/*[XT0210]*/Res.Xslt_CircularInclude,
input
.Value);
419
ContextInfo ctxInfo =
input
.GetAttributes(importIncludeAttributes);
421
if (
input
.MoveToXsltAttribute(0, "href")) {
423
Uri uri = ResolveUri(
input
.Value,
input
.BaseUri);
427
ReportError(/*[XT0180]*/Res.Xslt_CircularInclude,
input
.Value);
440
ContextInfo ctxInfo =
input
.GetAttributes(loadStripSpaceAttributes);
443
if (
input
.MoveToXsltAttribute(0, atoms.Elements)) {
444
ParseWhitespaceRules(
input
.Value, false);
450
ContextInfo ctxInfo =
input
.GetAttributes(loadStripSpaceAttributes);
453
if (
input
.MoveToXsltAttribute(0, atoms.Elements)) {
454
ParseWhitespaceRules(
input
.Value, true);
479
ContextInfo ctxInfo =
input
.GetAttributes(outputAttributes);
489
if (
input
.MoveToXsltAttribute(1, "method")) {
493
XmlQualifiedName method = ParseOutputMethod(
input
.Value, out outputMethod);
494
if (compiler.ExitForwardsCompatible(
input
.ForwardCompatibility) && method != null) {
508
if (
input
.MoveToXsltAttribute(3, "cdata-section-elements")) {
511
string[] qnames = XmlConvert.SplitString(
input
.Value);
516
if (compiler.ExitForwardsCompatible(
input
.ForwardCompatibility)) {
521
if (
input
.MoveToXsltAttribute(4, "doctype-public")) {
523
if (currentPrec == output.DocTypePublicPrec && settings.DocTypePublic !=
input
.Value) {
526
settings.DocTypePublic =
input
.Value;
531
if (
input
.MoveToXsltAttribute(5, "doctype-system")) {
533
if (currentPrec == output.DocTypeSystemPrec && settings.DocTypeSystem !=
input
.Value) {
536
settings.DocTypeSystem =
input
.Value;
541
if (
input
.MoveToXsltAttribute(6, "encoding")) {
545
Encoding encoding = Encoding.GetEncoding(
input
.Value);
546
if (currentPrec == output.EncodingPrec && output.Encoding !=
input
.Value) {
550
output.Encoding =
input
.Value;
553
if (!
input
.ForwardCompatibility) {
554
ReportWarning(/*[XT_004]*/Res.Xslt_InvalidEncoding,
input
.Value);
578
if (
input
.MoveToXsltAttribute(10, "media-type")) {
580
if (currentPrec == output.MediaTypePrec && settings.MediaType !=
input
.Value) {
583
settings.MediaType =
input
.Value;
588
if (
input
.MoveToXsltAttribute(11, "normalization-form")) {
622
if (
input
.MoveToXsltAttribute(16, "version")) {
624
if (currentPrec == output.VersionPrec && output.Version !=
input
.Value) {
629
output.Version =
input
.Value;
701
ContextInfo ctxInfo =
input
.GetAttributes(keyAttributes);
709
input
.MoveToElement();
715
input
.SkipNode();
732
Key key = (Key)SetInfo(f.Key(keyName, match, use,
input
.XslVersion), null, ctxInfo);
760
ContextInfo ctxInfo =
input
.GetAttributes(decimalFormatAttributes);
764
if (
input
.MoveToXsltAttribute(0, "name")) {
766
name = ResolveQName(/*ignoreDefaultNs:*/true,
input
.Value);
767
if (!compiler.ExitForwardsCompatible(
input
.ForwardCompatibility)) {
776
if (
input
.MoveToXsltAttribute(1, "infinity")) {
777
infinity =
input
.Value;
781
if (
input
.MoveToXsltAttribute(2, "NaN")) {
782
nan =
input
.Value;
798
bool dummy =
input
.MoveToXsltAttribute(3 + j, decimalFormatAttributes[3 + j].name) ||
input
.MoveToXsltAttribute(3 + i, decimalFormatAttributes[3 + i].name);
809
input
.MoveToXsltAttribute(1, "infinity");
811
input
.MoveToXsltAttribute(2, "NaN");
814
input
.MoveToXsltAttribute(3 + idx, decimalFormatAttributes[3 + idx].name);
831
ContextInfo ctxInfo =
input
.GetAttributes(namespaceAliasAttributes);
838
if (
input
.MoveToXsltAttribute(0, "stylesheet-prefix")) {
839
if (
input
.Value.Length == 0) {
842
stylesheetNsUri =
input
.LookupXmlNamespace(
input
.Value == "#default" ? string.Empty :
input
.Value);
846
if (
input
.MoveToXsltAttribute(1, "result-prefix")) {
847
if (
input
.Value.Length == 0) {
850
resultPrefix =
input
.Value == "#default" ? string.Empty :
input
.Value;
851
resultNsUri =
input
.LookupXmlNamespace(resultPrefix);
863
input
.MoveToElement();
873
ContextInfo ctxInfo =
input
.GetAttributes(attributeSetAttributes);
892
if (
input
.MoveToXsltAttribute(1, "use-attribute-sets")) {
896
QName parentName =
input
.ElementName;
897
if (
input
.MoveToFirstChild()) {
899
switch (
input
.NodeType) {
902
if (
input
.IsXsltKeyword(atoms.Attribute)) {
905
ReportError(/*[XT_006]*/Res.Xslt_UnexpectedElement,
input
.QualifiedName, parentName);
906
input
.SkipNode();
913
Debug.Assert(
input
.NodeType == XmlNodeType.Text);
917
} while (
input
.MoveToNextSibling());
924
Debug.Assert(
input
.CanHaveApplyImports == false);
941
ContextInfo ctxInfo =
input
.GetAttributes(templateAttributes);
947
if (
input
.MoveToXsltAttribute(2, "priority")) {
948
priority = XPathConvert.StringToDouble(
input
.Value);
949
if (double.IsNaN(priority) && !
input
.ForwardCompatibility) {
950
ReportError(/*[XT0530]*/Res.Xslt_InvalidAttrValue, "priority",
input
.Value);
956
CheckError(!
input
.AttributeExists(1, "name"), /*[XT_007]*/Res.Xslt_BothMatchNameAbsent);
957
CheckError(
input
.AttributeExists(3, "mode"), /*[XT_008]*/Res.Xslt_ModeWithoutMatch );
959
if (
input
.AttributeExists(2, "priority")) {
968
if (
input
.MoveToXsltAttribute(4, "as")) {
972
curTemplate = f.Template(name, match, mode, priority,
input
.XslVersion);
975
input
.CanHaveApplyImports = (match != null);
1076
ContextInfo ctxInfo =
input
.GetAttributes(scriptAttributes);
1081
if (
input
.MoveToXsltAttribute(0, "implements-prefix")) {
1082
if (
input
.Value.Length == 0) {
1083
ReportError(/*[XT_009]*/Res.Xslt_EmptyAttrValue, "implements-prefix",
input
.Value);
1085
scriptNs =
input
.LookupXmlNamespace(
input
.Value);
1103
input
.SkipNode();
1109
string uriString =
input
.Uri;
1115
input
.SkipNode();
1119
QName parentName =
input
.ElementName;
1120
if (
input
.MoveToFirstChild()) {
1122
switch (
input
.NodeType) {
1124
int startLine =
input
.Start.Line;
1125
int endLine =
input
.End.Line;
1136
scriptCode.Append(
input
.Value);
1140
if (
input
.IsNs(atoms.UrnMsxsl) && (
input
.IsKeyword(atoms.Assembly) ||
input
.IsKeyword(atoms.Using))) {
1142
ReportError(/*[XT_012]*/Res.Xslt_ScriptNotAtTop,
input
.QualifiedName);
1143
input
.SkipNode();
1144
} else if (
input
.IsKeyword(atoms.Assembly)) {
1146
} else if (
input
.IsKeyword(atoms.Using)) {
1150
ReportError(/*[XT_012]*/Res.Xslt_UnexpectedElement,
input
.QualifiedName, parentName);
1151
input
.SkipNode();
1156
input
.NodeType == XmlNodeType.SignificantWhitespace ||
1157
input
.NodeType == XmlNodeType.Whitespace
1165
} while (
input
.MoveToNextSibling());
1169
lineNumber =
input
.Start.Line;
1171
scriptClass.AddScriptBlock(scriptCode.ToString(), uriString, lineNumber,
input
.Start);
1183
input
.GetAttributes(assemblyAttributes);
1209
asmLocation = Assembly.LoadFrom(ResolveUri(href,
input
.BaseUri).ToString()).Location;
1225
input
.GetAttributes(usingAttributes);
1227
if (
input
.MoveToXsltAttribute(0, "namespace")) {
1228
scriptClass.nsImports.Add(
input
.Value);
1265
QName parentName =
input
.ElementName;
1266
if (
input
.MoveToFirstChild()) {
1272
switch (
input
.NodeType) {
1274
string nspace =
input
.NamespaceUri;
1275
string name =
input
.LocalName;
1289
ReportError(error,
input
.QualifiedName, parentName);
1291
input
.SkipNode();
1336
result = SetLineInfo(f.Text(
input
.Value),
input
.BuildLineInfo());
1341
Debug.Assert(
input
.NodeType == XmlNodeType.Text);
1346
} while (
input
.MoveToNextSibling());
1353
QName parentName =
input
.ElementName;
1356
if (
input
.MoveToFirstChild()) {
1359
switch (
input
.NodeType) {
1361
if (
input
.IsXsltKeyword(atoms.WithParam)) {
1365
} else if (flags == InstructionFlags.AllowSort &&
input
.IsXsltKeyword(atoms.Sort)) {
1367
} else if (flags == InstructionFlags.AllowFallback &&
input
.IsXsltKeyword(atoms.Fallback)) {
1370
ReportError(/*[XT_016]*/Res.Xslt_UnexpectedElement,
input
.QualifiedName, parentName);
1371
input
.SkipNode();
1378
Debug.Assert(
input
.NodeType == XmlNodeType.Text);
1382
} while (
input
.MoveToNextSibling());
1389
ContextInfo ctxInfo =
input
.GetAttributes();
1390
if (!
input
.CanHaveApplyImports) {
1392
input
.SkipNode();
1398
ctxInfo.SaveExtendedLineInfo(
input
);
1403
if (!
input
.ForwardCompatibility) {
1415
return SetInfo(f.ApplyImports(/*Mode:*/curTemplate.Mode, curStylesheet,
input
.XslVersion), content, ctxInfo);
1424
ContextInfo ctxInfo =
input
.GetAttributes(applyTemplatesAttributes);
1433
ctxInfo.SaveExtendedLineInfo(
input
);
1434
return SetInfo(f.ApplyTemplates(mode, select, ctxInfo,
input
.XslVersion),
1445
ContextInfo ctxInfo =
input
.GetAttributes(callTemplateAttributes);
1449
ctxInfo.SaveExtendedLineInfo(
input
);
1463
ContextInfo ctxInfo =
input
.GetAttributes(copyAttributes);
1471
if (
input
.MoveToXsltAttribute(2, "use-attribute-sets")) {
1488
ContextInfo ctxInfo =
input
.GetAttributes(copyOfAttributes);
1497
return SetInfo(f.CopyOf(select,
input
.XslVersion), null, ctxInfo);
1503
input
.GetAttributes();
1504
input
.SkipNode();
1512
ContextInfo ctxInfo =
input
.GetAttributes(ifAttributes);
1515
return SetInfo(f.If(test,
input
.XslVersion), LoadInstructions(), ctxInfo);
1519
ContextInfo ctxInfo =
input
.GetAttributes();
1525
QName parentName =
input
.ElementName;
1526
if (
input
.MoveToFirstChild()) {
1528
switch (
input
.NodeType) {
1531
if (Ref.Equal(
input
.NamespaceUri, atoms.UriXsl)) {
1532
if (Ref.Equal(
input
.LocalName, atoms.When)) {
1535
input
.SkipNode();
1541
} else if (Ref.Equal(
input
.LocalName, atoms.Otherwise)) {
1544
input
.SkipNode();
1553
ReportError(/*[XT_020]*/Res.Xslt_UnexpectedElement,
input
.QualifiedName, parentName);
1554
input
.SkipNode();
1563
Debug.Assert(
input
.NodeType == XmlNodeType.Text);
1567
} while (
input
.MoveToNextSibling());
1574
ContextInfo ctxInfo =
input
.GetAttributes();
1582
ContextInfo ctxInfo =
input
.GetAttributes(forEachAttributes);
1586
input
.CanHaveApplyImports = false;
1588
ctxInfo.SaveExtendedLineInfo(
input
);
1590
return SetInfo(f.ForEach(select, ctxInfo,
input
.XslVersion),
1602
ContextInfo ctxInfo =
input
.GetAttributes(messageAttributes);
1612
content.Insert(0, f.CopyOf(select,
input
.XslVersion));
1634
ContextInfo ctxInfo =
input
.GetAttributes(numberAttributes);
1640
if (
input
.MoveToXsltAttribute(2, "level")) {
1641
switch (
input
.Value) {
1646
if (!
input
.ForwardCompatibility) {
1647
ReportError(/*[XT_022]*/Res.Xslt_InvalidAttrValue, "level",
input
.Value);
1671
input
.XslVersion
1684
ContextInfo ctxInfo =
input
.GetAttributes(valueOfAttributes);
1691
if (!
input
.BackwardCompatibility) {
1702
input
.SkipNode();
1708
CheckError(select == null && content.Count == 0, /*[???]*/Res.Xslt_NoSelectNoContent,
input
.ElementName);
1715
return SetInfo(f.XslNode(doe ? XslNodeType.ValueOfDoe : XslNodeType.ValueOf, null, select,
input
.XslVersion),
1751
string localName =
input
.LocalName;
1760
ContextInfo ctxInfo =
input
.GetAttributes(
1771
if (!
input
.ForwardCompatibility) {
1786
if (!
input
.ForwardCompatibility) {
1797
VarPar result = f.VarPar(nodeType, name, select,
input
.XslVersion);
1808
ContextInfo ctxInfo =
input
.GetAttributes(commentAttributes);
1816
QName parentName =
input
.ElementName;
1833
ContextInfo ctxInfo =
input
.GetAttributes(processingInstructionAttributes);
1838
return SetInfo(f.PI(name,
input
.XslVersion), LoadContent(select != null), ctxInfo);
1846
ContextInfo ctxInfo =
input
.GetAttributes(textAttributes);
1854
QName parentName =
input
.ElementName;
1855
if (
input
.MoveToFirstChild()) {
1857
switch (
input
.NodeType) {
1862
content.Add(f.Text(
input
.Value, hints));
1865
Debug.Assert(
input
.NodeType == XmlNodeType.Element);
1866
ReportError(/*[XT_023]*/Res.Xslt_UnexpectedElement,
input
.QualifiedName, parentName);
1867
input
.SkipNode();
1870
} while (
input
.MoveToNextSibling());
1888
ContextInfo ctxInfo =
input
.GetAttributes(elementAttributes);
1901
if (
input
.MoveToXsltAttribute(3, "use-attribute-sets")) {
1904
return SetInfo(f.Element(name, ns,
input
.XslVersion),
1920
ContextInfo ctxInfo =
input
.GetAttributes(attributeAttributes);
1935
return SetInfo(f.Attribute(name, ns,
input
.XslVersion), LoadContent(select != null), ctxInfo);
1950
ContextInfo ctxInfo =
input
.GetAttributes(sortAttributes);
1979
return SetInfo(f.Sort(select, lang, dataType, order, caseOrder,
input
.XslVersion),
2310
Debug.Assert(
input
.NodeType == XmlNodeType.Element);
2311
string prefix =
input
.Prefix;
2312
string name =
input
.LocalName;
2313
string nsUri =
input
.NamespaceUri;
2315
ContextInfo ctxInfo =
input
.GetLiteralAttributes(asStylesheet);
2317
if (
input
.IsExtensionNamespace(nsUri)) {
2324
for (int i = 1;
input
.MoveToLiteralAttribute(i); i++) {
2325
if (
input
.IsXsltNamespace() &&
input
.IsKeyword(atoms.UseAttributeSets)) {
2330
for (int i = 1;
input
.MoveToLiteralAttribute(i); i++) {
2331
if (!
input
.IsXsltNamespace()) {
2332
XslNode att = f.LiteralAttribute(f.QName(
input
.LocalName,
input
.NamespaceUri,
input
.Prefix),
input
.Value,
input
.XslVersion);
2364
if (compiler.IsDebug && !
input
.IsEmptyElement) {
2365
AddInstruction(content, SetLineInfo(f.Nop(),
input
.BuildLineInfo()));
2371
input
.GetVersionAttribute();
2372
if (!
input
.ForwardCompatibility) {
2373
ReportError(/*[XT_026]*/Res.Xslt_UnexpectedElement,
input
.QualifiedName, parentName);
2374
input
.SkipNode();
2377
ContextInfo ctxInfo =
input
.GetAttributes();
2378
List<XslNode> fallbacks = LoadFallbacks(
input
.LocalName);
2384
input
.MoveToElement();
2385
ISourceLineInfo extElmLineInfo =
input
.BuildNameLineInfo();
2389
if (
input
.MoveToFirstChild()) {
2391
if (
input
.IsXsltKeyword(atoms.Fallback)) {
2392
ContextInfo ctxInfo =
input
.GetAttributes();
2395
input
.SkipNode();
2397
} while (
input
.MoveToNextSibling());
2417
if (!
input
.MoveToXsltAttribute(attNum, "mode")) {
2422
string qname =
input
.Value;
2435
if (!compiler.ExitForwardsCompatible(
input
.ForwardCompatibility)) {
2445
if (!
input
.MoveToXsltAttribute(attNum, "mode")) {
2449
string modeList =
input
.Value;
2487
if (!compiler.ExitForwardsCompatible(
input
.ForwardCompatibility)) {
2503
if (
input
.MoveToXsltAttribute(attNum, "collation")) {
2525
namespaceName =
input
.LookupXmlNamespace(prefix);
2536
bool required =
input
.IsRequiredAttribute(attNum);
2541
if (
input
.MoveToXsltAttribute(attNum, "name")) {
2543
if (ResolveQName(/*ignoreDefaultNs:*/true,
input
.Value, out localName, out namespaceName, out prefix)) {
2548
compiler.ExitForwardsCompatible(
input
.ForwardCompatibility);
2557
Debug.Assert(
input
.IsRequiredAttribute(attNum), "It happened that @name as NCName is always required attribute");
2558
if (
input
.MoveToXsltAttribute(attNum, "name")) {
2559
return
input
.Value;
2589
namespaceName =
input
.LookupXmlNamespace(prefix);
2621
if (!
input
.ForwardCompatibility) {
2630
Debug.Assert(
input
.LocalName == "use-attribute-sets", "we are positioned on this attribute");
2634
foreach (string qname in XmlConvert.SplitString(
input
.Value)) {
2635
AddInstruction(list, SetLineInfo(f.UseAttributeSet(CreateXPathQName(qname)),
input
.BuildLineInfo()));
2637
if (!compiler.ExitForwardsCompatible(
input
.ForwardCompatibility)) {
2645
if (
input
.MoveToXsltAttribute(attNum, "use-character-maps")) {
2647
foreach (string qname in XmlConvert.SplitString(
input
.Value)) {
2650
if (!compiler.ExitForwardsCompatible(
input
.ForwardCompatibility)) {
2658
if (
input
.MoveToXsltAttribute(attNum, attName)) {
2659
return
input
.Value;
2665
if (
input
.MoveToXsltAttribute(attNum, attName)) {
2666
if (
input
.Value.Length == 1) {
2667
return
input
.Value[0];
2669
if (
input
.IsRequiredAttribute(attNum) || !
input
.ForwardCompatibility) {
2679
Debug.Assert(!
input
.IsRequiredAttribute(attNum), "All Yes/No attributes are optional.");
2680
if (
input
.MoveToXsltAttribute(attNum, attName)) {
2681
switch (
input
.Value) {
2685
if (!
input
.ForwardCompatibility) {
2695
Debug.Assert(!
input
.IsRequiredAttribute(attNum), "All 'type' attributes are optional.");
2696
if (
input
.MoveToXsltAttribute(attNum, "type")) {
2702
Debug.Assert(!
input
.IsRequiredAttribute(attNum), "All 'validation' attributes are optional.");
2704
if (
input
.MoveToXsltAttribute(attNum, attributeName)) {
2705
string value =
input
.Value;
2714
} else if (!
input
.ForwardCompatibility) {
2721
Debug.Assert(!
input
.IsRequiredAttribute(attNum), "All 'input-type-validation' attributes are optional.");
2722
if (
input
.MoveToXsltAttribute(attNum, "input-type-annotations")) {
2723
string value =
input
.Value;
2736
if (!
input
.ForwardCompatibility) {
2747
input
.MoveToElement();
2748
QName parentName =
input
.ElementName;
2761
if (
input
.MoveToFirstChild()) {
2764
if (
input
.NodeType != XmlNodeType.Whitespace) {
2766
result =
input
.BuildNameLineInfo();
2768
input
.SkipNode();
2770
} while (
input
.MoveToNextSibling());
2834
compiler.ReportError(
input
.BuildNameLineInfo(), res, args);
2838
compiler.ReportWarning(
input
.BuildNameLineInfo(), res, args);
2842
if (!
input
.ForwardCompatibility) {
2849
compiler.ReportError(
input
.BuildNameLineInfo(), res, args);