1 16 17 package org.apache.xerces.impl.xs.models; 18 19 import org.apache.xerces.xni.QName; 20 import org.apache.xerces.impl.xs.SubstitutionGroupHandler; 21 import org.apache.xerces.impl.xs.XMLSchemaException; 22 23 import java.util.Vector ; 24 25 37 public class XSEmptyCM implements XSCMValidator { 38 39 43 private static final short STATE_START = 0; 45 46 private static final Vector EMPTY = new Vector (0); 47 48 52 56 62 public int[] startContentModel(){ 63 return (new int[] {STATE_START}); 64 } 65 66 67 75 public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler){ 76 77 if (currentState[0] < 0) { 79 currentState[0] = XSCMValidator.SUBSEQUENT_ERROR; 80 return null; 81 } 82 83 currentState[0] = XSCMValidator.FIRST_ERROR; 84 return null; 85 } 86 87 88 94 public boolean endContentModel (int[] currentState){ 95 boolean isFinal = false; 96 int state = currentState[0]; 97 98 100 if (state < 0) { 102 return false; 103 } 104 105 106 return true; 107 } 108 109 115 public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException { 116 return false; 117 } 118 119 128 public Vector whatCanGoHere(int[] state) { 129 return EMPTY; 130 } 131 132 } | Popular Tags |