Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateXmlType()

XmlQueryType System.Xml.Xsl.Runtime.XmlQueryRuntime.CreateXmlType ( XPathItem item)
inlineprivate

Definition at line 548 of file XmlQueryRuntime.cs.

549 {
550 if (item.IsNode)
551 {
552 if (item is RtfNavigator)
553 {
554 return XmlQueryTypeFactory.Node;
555 }
557 switch (xPathNavigator.NodeType)
558 {
559 case XPathNodeType.Root:
560 case XPathNodeType.Element:
561 if (xPathNavigator.XmlType == null)
562 {
563 return XmlQueryTypeFactory.Type(xPathNavigator.NodeType, XmlQualifiedNameTest.New(xPathNavigator.LocalName, xPathNavigator.NamespaceURI), XmlSchemaComplexType.UntypedAnyType, isNillable: false);
564 }
565 return XmlQueryTypeFactory.Type(xPathNavigator.NodeType, XmlQualifiedNameTest.New(xPathNavigator.LocalName, xPathNavigator.NamespaceURI), xPathNavigator.XmlType, xPathNavigator.SchemaInfo.SchemaElement.IsNillable);
566 case XPathNodeType.Attribute:
567 if (xPathNavigator.XmlType == null)
568 {
569 return XmlQueryTypeFactory.Type(xPathNavigator.NodeType, XmlQualifiedNameTest.New(xPathNavigator.LocalName, xPathNavigator.NamespaceURI), DatatypeImplementation.UntypedAtomicType, isNillable: false);
570 }
571 return XmlQueryTypeFactory.Type(xPathNavigator.NodeType, XmlQualifiedNameTest.New(xPathNavigator.LocalName, xPathNavigator.NamespaceURI), xPathNavigator.XmlType, isNillable: false);
572 default:
573 return XmlQueryTypeFactory.Type(xPathNavigator.NodeType, XmlQualifiedNameTest.Wildcard, XmlSchemaComplexType.AnyType, isNillable: false);
574 }
575 }
576 return XmlQueryTypeFactory.Type((XmlSchemaSimpleType)item.XmlType, isStrict: true);
577 }
static XmlSchemaComplexType UntypedAnyType

References System.Xml.Schema.XmlSchemaComplexType.AnyType, System.Xml.Dictionary, System.item, System.Xml.Xsl.XmlQualifiedNameTest.New(), System.Xml.Xsl.XmlQueryTypeFactory.Node, System.Xml.Xsl.XmlQueryTypeFactory.Type(), System.Xml.Schema.XmlSchemaComplexType.UntypedAnyType, System.Xml.Schema.DatatypeImplementation.UntypedAtomicType, and System.Xml.Xsl.XmlQualifiedNameTest.Wildcard.

Referenced by System.Xml.Xsl.Runtime.XmlQueryRuntime.MatchesXmlType(), and System.Xml.Xsl.Runtime.XmlQueryRuntime.MatchesXmlType().