コード例 #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)
 {
 }