< prev index next >

src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java

Print this page
rev 2127 : 8048021: Remove @version tag in jaxp repo
Reviewed-by: joehw


  19  */
  20 
  21 package com.sun.org.apache.xerces.internal.impl.xs.traversers;
  22 
  23 import com.sun.org.apache.xerces.internal.impl.xpath.XPathException;
  24 import com.sun.org.apache.xerces.internal.impl.xs.SchemaSymbols;
  25 import com.sun.org.apache.xerces.internal.impl.xs.identity.Field;
  26 import com.sun.org.apache.xerces.internal.impl.xs.identity.IdentityConstraint;
  27 import com.sun.org.apache.xerces.internal.impl.xs.identity.Selector;
  28 import com.sun.org.apache.xerces.internal.util.DOMUtil;
  29 import com.sun.org.apache.xerces.internal.util.XMLChar;
  30 import org.w3c.dom.Element;
  31 
  32 /**
  33  * This class contains code that all three IdentityConstraint
  34  * traversers (the XSDUniqueTraverser, XSDKeyTraverser and
  35  * XSDKeyrefTraverser) rely upon.
  36  *
  37  * @xerces.internal
  38  *
  39  * @version $Id: XSDAbstractIDConstraintTraverser.java,v 1.7 2010-11-01 04:40:02 joehw Exp $
  40  */
  41 class XSDAbstractIDConstraintTraverser extends XSDAbstractTraverser {
  42 
  43     public XSDAbstractIDConstraintTraverser (XSDHandler handler,
  44             XSAttributeChecker gAttrCheck) {
  45         super(handler, gAttrCheck);
  46     }
  47 
  48     boolean traverseIdentityConstraint(IdentityConstraint ic,
  49             Element icElem, XSDocumentInfo schemaDoc, Object [] icElemAttrs) {
  50 
  51         // General Attribute Checking will have been done on icElem by caller
  52 
  53         // check for <annotation> and get selector
  54         Element sElem = DOMUtil.getFirstChildElement(icElem);
  55         if(sElem == null) {
  56             reportSchemaError("s4s-elt-must-match.2",
  57                     new Object[]{"identity constraint", "(annotation?, selector, field+)"},
  58                     icElem);
  59             return false;




  19  */
  20 
  21 package com.sun.org.apache.xerces.internal.impl.xs.traversers;
  22 
  23 import com.sun.org.apache.xerces.internal.impl.xpath.XPathException;
  24 import com.sun.org.apache.xerces.internal.impl.xs.SchemaSymbols;
  25 import com.sun.org.apache.xerces.internal.impl.xs.identity.Field;
  26 import com.sun.org.apache.xerces.internal.impl.xs.identity.IdentityConstraint;
  27 import com.sun.org.apache.xerces.internal.impl.xs.identity.Selector;
  28 import com.sun.org.apache.xerces.internal.util.DOMUtil;
  29 import com.sun.org.apache.xerces.internal.util.XMLChar;
  30 import org.w3c.dom.Element;
  31 
  32 /**
  33  * This class contains code that all three IdentityConstraint
  34  * traversers (the XSDUniqueTraverser, XSDKeyTraverser and
  35  * XSDKeyrefTraverser) rely upon.
  36  *
  37  * @xerces.internal
  38  *

  39  */
  40 class XSDAbstractIDConstraintTraverser extends XSDAbstractTraverser {
  41 
  42     public XSDAbstractIDConstraintTraverser (XSDHandler handler,
  43             XSAttributeChecker gAttrCheck) {
  44         super(handler, gAttrCheck);
  45     }
  46 
  47     boolean traverseIdentityConstraint(IdentityConstraint ic,
  48             Element icElem, XSDocumentInfo schemaDoc, Object [] icElemAttrs) {
  49 
  50         // General Attribute Checking will have been done on icElem by caller
  51 
  52         // check for <annotation> and get selector
  53         Element sElem = DOMUtil.getFirstChildElement(icElem);
  54         if(sElem == null) {
  55             reportSchemaError("s4s-elt-must-match.2",
  56                     new Object[]{"identity constraint", "(annotation?, selector, field+)"},
  57                     icElem);
  58             return false;


< prev index next >