示例#1
0
 public XQueryStepExpr(object nodeTest, XQueryPathExprType type, XQueryContext queryContext)
     : this(type, queryContext)
 {
     if (nodeTest is XmlQualifiedNameTest)
         m_nameTest = (XmlQualifiedNameTest)nodeTest;
     else if (nodeTest is XQuerySequenceType)
         m_typeTest = (XQuerySequenceType)nodeTest;
     else
         throw new ArgumentException("nodeTest");
 }
示例#2
0
 /// <summary>
 /// Return true if the result of intersection with other is not empty
 /// </summary>
 public bool HasIntersection(XmlQualifiedNameTest other)
 {
     return (IsNamespaceSubsetOf(other) || other.IsNamespaceSubsetOf(this)) && (IsNameSubsetOf(other) || other.IsNameSubsetOf(this));
 }
示例#3
0
 /// <summary>
 /// True if this matches every QName other does
 /// </summary>
 public bool IsSubsetOf(XmlQualifiedNameTest other)
 {
     return IsNameSubsetOf(other) && IsNamespaceSubsetOf(other);
 }
示例#4
0
 private bool IsNamespaceSubsetOf(XmlQualifiedNameTest other)
 {
     return other.IsNamespaceWildcard
         || (this.exclude == other.exclude && this.Namespace == other.Namespace)
         || (other.exclude && !this.exclude && this.Namespace != other.Namespace);
 }
示例#5
0
 private bool IsNameSubsetOf(XmlQualifiedNameTest other)
 {
     return other.IsNameWildcard || this.Name == other.Name;
 }
示例#6
0
 public XQuerySequenceType(XmlTypeCode typeCode, XmlQualifiedNameTest nameTest)
 {
     TypeCode = typeCode;
     Cardinality = XmlTypeCardinality.One;
     NameTest = nameTest;
     IsNode = TypeCodeIsNodeType(TypeCode);
     if (TypeCode != XmlTypeCode.Item && !IsNode)
         SchemaType = XmlSchemaType.GetBuiltInSimpleType(TypeCode);
     ItemType = TypeCodeToItemType(TypeCode, SchemaType);
 }
示例#7
0
 public XQuerySequenceType(XmlTypeCode typeCode, XmlQualifiedNameTest nameTest, XmlSchemaType schemaType, bool isOptional)
 {
     TypeCode = typeCode;
     Cardinality = XmlTypeCardinality.One;
     NameTest = nameTest;
     SchemaType = schemaType;
     Nillable = Nillable;
     IsNode = TypeCodeIsNodeType(TypeCode);
     ItemType = TypeCodeToItemType(TypeCode, SchemaType);
 }
示例#8
0
 public XQuerySequenceType(XmlTypeCode typeCode, XmlQualifiedNameTest nameTest, XmlSchemaType schemaType)
     : this(typeCode, nameTest, schemaType, false)
 {
 }