Examples of XSAssertImpl


Examples of org.apache.xerces.impl.xs.assertion.XSAssertImpl

                 for (int i = 0; i < facets.getLength(); i++) {
                    XSMultiValueFacet facet = (XSMultiValueFacet) facets.item(i);
                    if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) {
                       Vector attrAsserts = facet.getAsserts();
                       for (int j = 0; j < attrAsserts.size(); j++) {
                         XSAssertImpl attrAssert = (XSAssertImpl) attrAsserts.elementAt(j);
                         attrAssert.setAttrName(attributes.getLocalName(attrIndx));
                         attrAssert.setAttrValue(attributes.getValue(attrIndx));
                         assertions.addXSObject(attrAssert);   
                       }                       
                       break;
                    }
                 }
View Full Code Here

Examples of org.apache.xerces.impl.xs.assertion.XSAssertImpl

              // complex type with complex content               
              // $value should be, the XPath2 "empty sequence" ... TO DO
            }
            XSObjectList assertList = (XSObjectList) assertions;
            for (int i = 0; i < assertList.size(); i++) {
               XSAssertImpl assertImpl = (XSAssertImpl) assertList.get(i);              
               boolean xpathContextExists = false;
               if (assertImpl.getType() == XSConstants.ASSERTION) {
                  // not an assertion facet
                  xpathContextExists = true;  
               }
               // check if this is an assertion, from the attribute
               if (assertImpl.getAttrValue() != null) {
                  // reassign value (the attribute's value) to variable
                  // $value.
                  value = assertImpl.getAttrValue();
                  setValueOf$value(value, assertImpl.getTypeDefinition());
               }
               evaluateAssertion(element,
                                 assertImpl,
                                 value,
                                 xpathContextExists);
            }
         }
         else if (assertions instanceof Vector) {
            // assertions from a simple type definition
            setValueOf$value(value, null);
            Vector assertList = (Vector) assertions;                   
            for (int i = 0; i < assertList.size(); i++) {
                XSAssertImpl assertImpl = (XSAssertImpl) assertList.get(i);
                evaluateAssertion(element, assertImpl, value, false);
            }
         }
    }
View Full Code Here

Examples of org.apache.xerces.impl.xs.assertion.XSAssertImpl

                for (int i = 0; i < facets.getLength(); i++) {
                    XSMultiValueFacet facet = (XSMultiValueFacet) facets.item(i);
                    if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) {
                       Vector assertionFacets = facet.getAsserts();
                       for (int j = 0; j < assertionFacets.size(); j++) {
                          XSAssertImpl assertImpl = (XSAssertImpl) assertionFacets.get(j);
                          addAssertion(assertImpl);
                       }
                       break;
                    }
                }
View Full Code Here

Examples of org.apache.xerces.impl.xs.assertion.XSAssertImpl

                // if no annotations are present add an empty list to the assertion
                annotations = XSObjectListImpl.EMPTY_LIST;
            }
           
            // create an assertion object           
            XSAssertImpl assertImpl = new XSAssertImpl(enclosingCT,
                                                    annotations,
                                                    fSchemaHandler);
            Test testExpr = new Test(new XPath20Assert(test, fSymbolTable,
                                      schemaDoc.fNamespaceSupport), assertImpl);
            assertImpl.setTest(testExpr);
            assertImpl.setXPathDefaultNamespace(xpathDefaultNamespace);
            assertImpl.setXPath2NamespaceContext(schemaDoc.fNamespaceSupport);
            String assertMessage = assertElement.getAttributeNS(
                                          SchemaSymbols.URI_XERCES_EXTENSIONS,
                                          SchemaSymbols.ATT_ASSERT_MESSAGE);
            if (!"".equals(assertMessage.trim())) {
               assertImpl.setMessage(assertMessage.trim());
            }

            // add assertion object, to the list of assertions to be processed
            addAssertion(assertImpl);
View Full Code Here

Examples of org.apache.xerces.impl.xs.assertion.XSAssertImpl

                        //if no annotations are present add an empty list to the assertion
                        annotations = XSObjectListImpl.EMPTY_LIST;
                    }
                   
                    // create an assertion object
                    XSAssertImpl assertImpl = new XSAssertImpl(typeDef,
                                                           annotations,
                                                           fSchemaHandler);
                    Test testExpr = new Test(new XPath20Assert(test, fSymbolTable,
                                           schemaDoc.fNamespaceSupport), assertImpl);                
                    assertImpl.setType(XSConstants.ASSERTION_FACET);
                    assertImpl.setTest(testExpr);
                    assertImpl.setXPathDefaultNamespace(xpathDefaultNamespace);
                    assertImpl.setXPath2NamespaceContext(schemaDoc.fNamespaceSupport);
                    String assertMessage = content.getAttributeNS(
                                                SchemaSymbols.URI_XERCES_EXTENSIONS,
                                                SchemaSymbols.ATT_ASSERT_MESSAGE);
                    if (!"".equals(assertMessage.trim())) {
                       assertImpl.setMessage(assertMessage.trim());
                    }
                   
                    if (assertData == null) {
                       assertData = new Vector();
                    }                   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.