/** Constructs a value store for the specified identity constraint. */ protected ValueStoreBase(IdentityConstraint identityConstraint, String elementName) { fElementName = elementName; fIdentityConstraint = identityConstraint; fFieldCount = fIdentityConstraint.getFieldCount(); fFields = new Field[fFieldCount]; fLocalValues = new Object[fFieldCount]; fLocalValueTypes = new short[fFieldCount]; fLocalItemValueTypes = new ShortList[fFieldCount]; for (int i = 0; i < fFieldCount; i++) { fFields[i] = fIdentityConstraint.getFieldAt(i); } } // <init>(IdentityConstraint)
/** * The start of an element. If the document specifies the start element * by using an empty tag, then the startElement method will immediately * be followed by the endElement method, with no intervening methods. * * @param element The name of the element. * @param attributes The element attributes. * */ public void startElement(QName element, XMLAttributes attributes) { super.startElement(element, attributes); fElementDepth++; // activate the fields, if selector is matched //int matched = isMatched(); if (isMatched()) { /* (fMatchedDepth == -1 && ((matched & MATCHED) == MATCHED)) || ((matched & MATCHED_DESCENDANT) == MATCHED_DESCENDANT)) { */ fMatchedDepth = fElementDepth; fFieldActivator.startValueScopeFor(fIdentityConstraint, fInitialDepth); int count = fIdentityConstraint.getFieldCount(); for (int i = 0; i < count; i++) { Field field = fIdentityConstraint.getFieldAt(i); XPathMatcher matcher = fFieldActivator.activateField(field, fInitialDepth); matcher.startElement(element, attributes); } } } // startElement(QName,XMLAttrList,int)