public CompiledIdentityConstraint(XmlSchemaIdentityConstraint constraint, XmlNamespaceManager nsmgr) {
            this.name = constraint.QualifiedName;

            //public Asttree (string xPath, bool isField, XmlNamespaceManager nsmgr)
            try {
                this.selector = new Asttree(constraint.Selector.XPath, false, nsmgr);
            }
            catch (XmlSchemaException e) {
                e.SetSource(constraint.Selector);
                throw e;
            }
            XmlSchemaObjectCollection fields = constraint.Fields;
            Debug.Assert(fields.Count > 0);
            this.fields = new Asttree[fields.Count];
            for(int idxField = 0; idxField < fields.Count; idxField ++) {
                try {
                    this.fields[idxField] = new Asttree(((XmlSchemaXPath)fields[idxField]).XPath, true, nsmgr);
                }
                catch (XmlSchemaException e) {
                    e.SetSource(constraint.Fields[idxField]);
                    throw e;
                }
            }
            if (constraint is XmlSchemaUnique) {
                this.role = ConstraintRole.Unique;
            } 
            else if (constraint is XmlSchemaKey) {
                this.role = ConstraintRole.Key;
            } 
            else {             // XmlSchemaKeyref
                this.role = ConstraintRole.Keyref;
                this.refer = ((XmlSchemaKeyref)constraint).Refer; 
            }
        }
 public SelectorActiveAxis(Asttree axisTree, ConstraintStruct cs) : base(axisTree) {
     this.KSs = new ArrayList();
     this.cs = cs;
 }
 internal LocatedActiveAxis (Asttree astfield, KeySequence ks, int column) : base (astfield) {
     this.Ks = ks;
     this.column = column;
     this.isMatched = false;
 }
Example #4
0
 internal ActiveAxis(Asttree axisTree)
 {
     _axisTree = axisTree;                                               // only a pointer.  do i need it?
     _currentDepth = -1;                                                 // context depth is 0 -- enforce moveToChild for the context node
                                                                         // otherwise can't deal with "." node
     _axisStack = new ArrayList(axisTree.SubtreeArray.Count);            // defined length
     // new one stack element for each one
     for (int i = 0; i < axisTree.SubtreeArray.Count; ++i)
     {
         AxisStack stack = new AxisStack((ForwardAxis)axisTree.SubtreeArray[i], this);
         _axisStack.Add(stack);
     }
     _isActive = true;
 }
Example #5
0
 internal LocatedActiveAxis (Asttree astfield, int row, int column) : base (astfield) {
     this.row = row;
     this.column = column;
     this.isMatched = false;
 }
Example #6
0
 internal ActiveAxis (Asttree axisTree) {
     this.axisTree = axisTree;                                               // only a pointer.  do i need it?
     this.currentDepth = -1;                                                 // context depth is 0 -- enforce moveToChild for the context node
                                                                             // otherwise can't deal with "." node
     this.axisStack = new ArrayList(axisTree.SubtreeArray.Count);            // defined length
     // new one stack element for each one
     foreach (ForwardAxis faxis in axisTree.SubtreeArray) {
         AxisStack stack = new AxisStack (faxis, this);
         axisStack.Add (stack);
     }
     this.isActive = true;
 }