protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLStreamException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected EntityDecl findEntityDecl(DTDValidatorBase v, char[] ch, int start, int len, int hash) throws XMLStreamException { Map entMap = v.getEntityMap(); /* !!! 13-Nov-2005, TSa: If this was to become a bottle-neck, we * could use/share a symbol table. Or at least reuse Strings... */ String id = new String(ch, start, len); EntityDecl ent = (EntityDecl) entMap.get(id); if (ent == null) { reportValidationProblem(v, "Referenced entity '"+id+"' not defined"); } else if (ent.isParsed()) { reportValidationProblem(v, "Referenced entity '"+id+"' is not an unparsed entity"); } return ent; }
protected String validateDefaultNmToken(InputProblemReporter rep, boolean normalize) throws XMLStreamException { String origDefValue = mDefValue.getValue(); String defValue = origDefValue.trim(); if (defValue.length() == 0) { reportValidationProblem(rep, "Invalid default value '"+defValue+"'; empty String is not a valid NMTOKEN"); } int illegalIx = WstxInputData.findIllegalNmtokenChar(defValue, mCfgNsAware, mCfgXml11); if (illegalIx >= 0) { reportValidationProblem(rep, "Invalid default value '"+defValue +"'; character #"+illegalIx+" (" +WstxInputData.getCharDesc(defValue.charAt(illegalIx)) +") not valid NMTOKEN character"); } // Ok, cool it's ok... return normalize ? defValue : origDefValue; }
protected String validateDefaultName(InputProblemReporter rep, boolean normalize) throws XMLStreamException { String origDefValue = mDefValue.getValue(); String defValue = origDefValue.trim(); if (defValue.length() == 0) { reportValidationProblem(rep, "Invalid default value '"+defValue +"'; empty String is not a valid name"); } // Ok, needs to be a valid XML name: int illegalIx = WstxInputData.findIllegalNameChar(defValue, mCfgNsAware, mCfgXml11); if (illegalIx >= 0) { if (illegalIx == 0) { reportValidationProblem(rep, "Invalid default value '"+defValue+"'; character " +WstxInputData.getCharDesc(defValue.charAt(0)) +") not valid first character of a name"); } else { reportValidationProblem(rep, "Invalid default value '"+defValue+"'; character #"+illegalIx+" (" +WstxInputData.getCharDesc(defValue.charAt(illegalIx)) +") not valid name character"); } } // Ok, cool it's ok... return normalize ? defValue : origDefValue; }
if (illegalIx >= 0) { if (illegalIx == 0) { reportValidationProblem(rep, "Invalid default value '"+defValue +"'; character " +WstxInputData.getCharDesc(defValue.charAt(start)) +") not valid first character of a name token"); } else { reportValidationProblem(rep, "Invalid default value '"+defValue +"'; character " +WstxInputData.getCharDesc(c) reportValidationProblem(rep, "Invalid default value '"+defValue +"'; empty String is not a valid name value");
protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLValidationException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLValidationException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLStreamException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLStreamException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLValidationException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLStreamException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected String reportInvalidChar(DTDValidatorBase v, char c, String msg) throws XMLStreamException { reportValidationProblem(v, "Invalid character "+WstxInputData.getCharDesc(c)+": "+msg); return null; }
protected EntityDecl findEntityDecl(DTDValidatorBase v, char[] ch, int start, int len /*, int hash*/) throws XMLStreamException { Map<String,EntityDecl> entMap = v.getEntityMap(); /* !!! 13-Nov-2005, TSa: If this was to become a bottle-neck, we * could use/share a symbol table. Or at least reuse Strings... */ String id = new String(ch, start, len); EntityDecl ent = entMap.get(id); if (ent == null) { reportValidationProblem(v, "Referenced entity '"+id+"' not defined"); } else if (ent.isParsed()) { reportValidationProblem(v, "Referenced entity '"+id+"' is not an unparsed entity"); } return ent; }
protected EntityDecl findEntityDecl(DTDValidatorBase v, char[] ch, int start, int len /*, int hash*/) throws XMLStreamException { Map<String,EntityDecl> entMap = v.getEntityMap(); /* !!! 13-Nov-2005, TSa: If this was to become a bottle-neck, we * could use/share a symbol table. Or at least reuse Strings... */ String id = new String(ch, start, len); EntityDecl ent = entMap.get(id); if (ent == null) { reportValidationProblem(v, "Referenced entity '"+id+"' not defined"); } else if (ent.isParsed()) { reportValidationProblem(v, "Referenced entity '"+id+"' is not an unparsed entity"); } return ent; }
protected EntityDecl findEntityDecl(DTDValidatorBase v, char[] ch, int start, int len, int hash) throws XMLValidationException { Map entMap = v.getEntityMap(); /* !!! 13-Nov-2005, TSa: If this was to become a bottle-neck, we * could use/share a symbol table. Or at least reuse Strings... */ String id = new String(ch, start, len); EntityDecl ent = (EntityDecl) entMap.get(id); if (ent == null) { reportValidationProblem(v, "Referenced entity '"+id+"' not defined"); } else if (ent.isParsed()) { reportValidationProblem(v, "Referenced entity '"+id+"' is not an unparsed entity"); } return ent; }
protected EntityDecl findEntityDecl(DTDValidatorBase v, char[] ch, int start, int len, int hash) throws XMLValidationException { Map entMap = v.getEntityMap(); /* !!! 13-Nov-2005, TSa: If this was to become a bottle-neck, we * could use/share a symbol table. Or at least reuse Strings... */ String id = new String(ch, start, len); EntityDecl ent = (EntityDecl) entMap.get(id); if (ent == null) { reportValidationProblem(v, "Referenced entity '"+id+"' not defined"); } else if (ent.isParsed()) { reportValidationProblem(v, "Referenced entity '"+id+"' is not an unparsed entity"); } return ent; }
protected EntityDecl findEntityDecl(DTDValidatorBase v, char[] ch, int start, int len /*, int hash*/) throws XMLStreamException { Map<String,EntityDecl> entMap = v.getEntityMap(); /* !!! 13-Nov-2005, TSa: If this was to become a bottle-neck, we * could use/share a symbol table. Or at least reuse Strings... */ String id = new String(ch, start, len); EntityDecl ent = entMap.get(id); if (ent == null) { reportValidationProblem(v, "Referenced entity '"+id+"' not defined"); } else if (ent.isParsed()) { reportValidationProblem(v, "Referenced entity '"+id+"' is not an unparsed entity"); } return ent; }
protected String validateDefaultNmToken(InputProblemReporter rep, boolean normalize) throws XMLStreamException { String origDefValue = mDefValue.getValue(); String defValue = origDefValue.trim(); if (defValue.length() == 0) { reportValidationProblem(rep, "Invalid default value '"+defValue+"'; empty String is not a valid NMTOKEN"); } int illegalIx = WstxInputData.findIllegalNmtokenChar(defValue, mCfgNsAware, mCfgXml11); if (illegalIx >= 0) { reportValidationProblem(rep, "Invalid default value '"+defValue +"'; character #"+illegalIx+" (" +WstxInputData.getCharDesc(defValue.charAt(illegalIx)) +") not valid NMTOKEN character"); } // Ok, cool it's ok... return normalize ? defValue : origDefValue; }
protected String validateDefaultNmToken(InputProblemReporter rep, boolean normalize) throws XMLStreamException { String origDefValue = mDefValue.getValue(); String defValue = origDefValue.trim(); if (defValue.length() == 0) { reportValidationProblem(rep, "Invalid default value '"+defValue+"'; empty String is not a valid NMTOKEN"); } int illegalIx = WstxInputData.findIllegalNmtokenChar(defValue, mCfgNsAware, mCfgXml11); if (illegalIx >= 0) { reportValidationProblem(rep, "Invalid default value '"+defValue +"'; character #"+illegalIx+" (" +WstxInputData.getCharDesc(defValue.charAt(illegalIx)) +") not valid NMTOKEN character"); } // Ok, cool it's ok... return normalize ? defValue : origDefValue; }
protected String validateDefaultNmToken(InputProblemReporter rep, boolean normalize) throws XMLValidationException { String origDefValue = mDefValue.getValue(); String defValue = origDefValue.trim(); if (defValue.length() == 0) { reportValidationProblem(rep, "Invalid default value '"+defValue+"'; empty String is not a valid NMTOKEN"); } int illegalIx = WstxInputData.findIllegalNmtokenChar(defValue, mCfgNsAware, mCfgXml11); if (illegalIx >= 0) { reportValidationProblem(rep, "Invalid default value '"+defValue +"'; character #"+illegalIx+" (" +WstxInputData.getCharDesc(defValue.charAt(illegalIx)) +") not valid NMTOKEN character"); } // Ok, cool it's ok... return normalize ? defValue : origDefValue; }