public final String getDefaultValue(ValidationContext ctxt, XMLValidator dtd) throws XMLStreamException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt, dtd); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
/** * Method called to do initial normalization of the default attribute * value, without trying to verify its validity. Thus, it's * called independent of whether we are fully validating the document. */ public void normalizeDefault() { String val = mDefValue.getValue(); if (val.length() > 0) { char[] cbuf = val.toCharArray(); String str = StringUtil.normalizeSpaces(cbuf, 0, cbuf.length); if (str != null) { mDefValue.setValue(str); } } }
public final String getDefaultValue(ValidationContext ctxt, XMLValidator dtd) throws XMLStreamException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt, dtd); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
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; }
public final String getDefaultValue(ValidationContext ctxt, XMLValidator dtd) throws XMLStreamException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt, dtd); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
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; }
public final String getDefaultValue(ValidationContext ctxt, XMLValidator dtd) throws XMLStreamException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt, dtd); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
protected String validateDefaultNames(InputProblemReporter rep, boolean normalize) throws XMLStreamException String defValue = mDefValue.getValue().trim(); int len = defValue.length();
public final String getDefaultValue(ValidationContext ctxt) throws XMLValidationException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
throws XMLStreamException String defValue = mDefValue.getValue(); int len = defValue.length();
public final String getDefaultValue(ValidationContext ctxt) throws XMLValidationException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
/** * Method called to do initial normalization of the default attribute * value, without trying to verify its validity. Thus, it's * called independent of whether we are fully validating the document. */ public void normalizeDefault() { String val = mDefValue.getValue(); if (val.length() > 0) { char[] cbuf = val.toCharArray(); String str = StringUtil.normalizeSpaces(cbuf, 0, cbuf.length); if (str != null) { mDefValue.setValue(str); } } }
public final String getDefaultValue(ValidationContext ctxt) throws XMLValidationException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
/** * Method called to do initial normalization of the default attribute * value, without trying to verify its validity. Thus, it's * called independent of whether we are fully validating the document. */ public void normalizeDefault() { String val = mDefValue.getValue(); if (val.length() > 0) { char[] cbuf = val.toCharArray(); String str = StringUtil.normalizeSpaces(cbuf, 0, cbuf.length); if (str != null) { mDefValue.setValue(str); } } }
public final String getDefaultValue(ValidationContext ctxt, XMLValidator dtd) throws XMLStreamException { String val = mDefValue.getValueIfOk(); if (val == null) { mDefValue.reportUndeclared(ctxt, dtd); /* should never get here, but just to be safe, let's use * the 'raw' value (one that does not have undeclared entities * included, most likely) */ val = mDefValue.getValue(); } return val; }
/** * Method called to do initial normalization of the default attribute * value, without trying to verify its validity. Thus, it's * called independent of whether we are fully validating the document. */ public void normalizeDefault() { String val = mDefValue.getValue(); if (val.length() > 0) { char[] cbuf = val.toCharArray(); String str = StringUtil.normalizeSpaces(cbuf, 0, cbuf.length); if (str != null) { mDefValue.setValue(str); } } }
/** * Method called to do initial normalization of the default attribute * value, without trying to verify its validity. Thus, it's * called independent of whether we are fully validating the document. */ public void normalizeDefault() { String val = mDefValue.getValue(); if (val.length() > 0) { char[] cbuf = val.toCharArray(); String str = StringUtil.normalizeSpaces(cbuf, 0, cbuf.length); if (str != null) { mDefValue.setValue(str); } } }
/** * Method called to do initial normalization of the default attribute * value, without trying to verify its validity. Thus, it's * called independent of whether we are fully validating the document. */ public void normalizeDefault() { String val = mDefValue.getValue(); if (val.length() > 0) { char[] cbuf = val.toCharArray(); String str = StringUtil.normalizeSpaces(cbuf, 0, cbuf.length); if (str != null) { mDefValue.setValue(str); } } }
/** * Method called to do initial normalization of the default attribute * value, without trying to verify its validity. Thus, it's * called independent of whether we are fully validating the document. */ public void normalizeDefault() { String val = mDefValue.getValue(); if (val.length() > 0) { char[] cbuf = val.toCharArray(); String str = StringUtil.normalizeSpaces(cbuf, 0, cbuf.length); if (str != null) { mDefValue.setValue(str); } } }
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; }