1 57 58 package com.sun.org.apache.xerces.internal.impl.xs.models; 59 60 import com.sun.org.apache.xerces.internal.xni.QName; 61 import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler; 62 import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaException; 63 64 import java.util.Vector ; 65 66 76 public class XSEmptyCM implements XSCMValidator { 77 78 82 private static final short STATE_START = 0; 84 85 private static final Vector EMPTY = new Vector (0); 86 87 91 95 101 public int[] startContentModel(){ 102 return (new int[] {STATE_START}); 103 } 104 105 106 113 public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler){ 114 115 if (currentState[0] < 0) { 117 currentState[0] = XSCMValidator.SUBSEQUENT_ERROR; 118 return null; 119 } 120 121 currentState[0] = XSCMValidator.FIRST_ERROR; 122 return null; 123 } 124 125 126 132 public boolean endContentModel (int[] currentState){ 133 boolean isFinal = false; 134 int state = currentState[0]; 135 136 138 if (state < 0) { 140 return false; 141 } 142 143 144 return true; 145 } 146 147 153 public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException { 154 return false; 155 } 156 157 166 public Vector whatCanGoHere(int[] state) { 167 return EMPTY; 168 } 169 170 } | Popular Tags |