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"); }
/// <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)); }
/// <summary> /// True if this matches every QName other does /// </summary> public bool IsSubsetOf(XmlQualifiedNameTest other) { return IsNameSubsetOf(other) && IsNamespaceSubsetOf(other); }
private bool IsNamespaceSubsetOf(XmlQualifiedNameTest other) { return other.IsNamespaceWildcard || (this.exclude == other.exclude && this.Namespace == other.Namespace) || (other.exclude && !this.exclude && this.Namespace != other.Namespace); }
private bool IsNameSubsetOf(XmlQualifiedNameTest other) { return other.IsNameWildcard || this.Name == other.Name; }
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); }
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); }
public XQuerySequenceType(XmlTypeCode typeCode, XmlQualifiedNameTest nameTest, XmlSchemaType schemaType) : this(typeCode, nameTest, schemaType, false) { }