/** * Method called when no validation is to be done, but value is still * to be normalized as much as it can. What this usually means is that * all regular space (parser earlier on converts other white space to * spaces, except for specific character entities; and these special * cases are NOT to be normalized). *<p> * The only exception is that CDATA will not do any normalization. But * for now, let's implement basic functionality that CDTA instance will * override * * @return Normalized value as a String, if any changes were done; * null if input was normalized */ public String normalize(DTDValidatorBase v, char[] cbuf, int start, int end) { return StringUtil.normalizeSpaces(cbuf, start, end); }
/** * 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 that can be called to force space normalization (remove * leading/trailing spaces, replace non-spaces white space with * spaces, collapse spaces to one) on specified attribute. * Currently called by {@link InputElementStack} to force * normalization of Xml:id attribute */ public void normalizeSpacesInValue(int index) { // StringUtil has a method, but it works on char arrays... char[] attrCB = mValueBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, getValueStartOffset(index), getValueStartOffset(index+1)); if (normValue != null) { mAttributes[index].setValue(normValue); } }
/** * Method called when no validation is to be done, but value is still * to be normalized as much as it can. What this usually means is that * all regular space (parser earlier on converts other white space to * spaces, except for specific character entities; and these special * cases are NOT to be normalized). *<p> * The only exception is that CDATA will not do any normalization. But * for now, let's implement basic functionality that CDTA instance will * override * * @param v Validator that invoked normalization * * @return Normalized value as a String, if any changes were done; * null if input was normalized */ public String normalize(DTDValidatorBase v, char[] cbuf, int start, int end) { return StringUtil.normalizeSpaces(cbuf, start, end); }
/** * Method called when no validation is to be done, but value is still * to be normalized as much as it can. What this usually means is that * all regular space (parser earlier on converts other white space to * spaces, except for specific character entities; and these special * cases are NOT to be normalized). *<p> * The only exception is that CDATA will not do any normalization. But * for now, let's implement basic functionality that CDTA instance will * override * * @return Normalized value as a String, if any changes were done; * null if input was normalized */ public String normalize(DTDValidatorBase v, char[] cbuf, int start, int end) { return StringUtil.normalizeSpaces(cbuf, start, end); }
/** * Method called when no validation is to be done, but value is still * to be normalized as much as it can. What this usually means is that * all regular space (parser earlier on converts other white space to * spaces, except for specific character entities; and these special * cases are NOT to be normalized). *<p> * The only exception is that CDATA will not do any normalization. But * for now, let's implement basic functionality that CDTA instance will * override * * @return Normalized value as a String, if any changes were done; * null if input was normalized */ public String normalize(DTDValidatorBase v, char[] cbuf, int start, int end) { return StringUtil.normalizeSpaces(cbuf, start, end); }
/** * 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); } } }
/** * 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 that can be called to force space normalization (remove * leading/trailing spaces, replace non-spaces white space with * spaces, collapse spaces to one) on specified attribute. * Currently called by {@link InputElementStack} to force * normalization of Xml:id attribute */ public void normalizeSpacesInValue(int index) { // StringUtil has a method, but it works on char arrays... char[] attrCB = mValueBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, getValueStartOffset(index), getValueStartOffset(index+1)); if (normValue != null) { mAttributes[index].setValue(normValue); } }
/** * Method that can be called to force space normalization (remove * leading/trailing spaces, replace non-spaces white space with * spaces, collapse spaces to one) on specified attribute. * Currently called by {@link InputElementStack} to force * normalization of Xml:id attribute */ public void normalizeSpacesInValue(int index) { // StringUtil has a method, but it works on char arrays... char[] attrCB = mValueBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, getValueStartOffset(index), getValueStartOffset(index+1)); if (normValue != null) { mAttributes[index].setValue(normValue); } }
/** * Method that can be called to force space normalization (remove * leading/trailing spaces, replace non-spaces white space with * spaces, collapse spaces to one) on specified attribute. * Currently called by {@link InputElementStack} to force * normalization of Xml:id attribute */ public void normalizeSpacesInValue(int index) { // StringUtil has a method, but it works on char arrays... char[] attrCB = mValueBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, getValueStartOffset(index), getValueStartOffset(index+1)); if (normValue != null) { mAttributes[index].setValue(normValue); } }
/** * Method that can be called to force space normalization (remove * leading/trailing spaces, replace non-spaces white space with * spaces, collapse spaces to one) on specified attribute. * Currently called by {@link InputElementStack} to force * normalization of Xml:id attribute */ public void normalizeSpacesInValue(int index) { // StringUtil has a method, but it works on char arrays... char[] attrCB = mValueBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, getValueStartOffset(index), getValueStartOffset(index+1)); if (normValue != null) { mAttributes[index].setValue(normValue); } }
/** * Method called to normalize value of an ID attribute, specified * using name xml:id, when support for Xml:id specification enabled. */ protected final void normalizeXmlIdAttr(AttributeCollector ac, int ix) { // StringUtil has a method, but it works on char arrays... TextBuilder attrBuilder = ac.getAttrBuilder(); char[] attrCB = attrBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, attrBuilder.getOffset(ix), attrBuilder.getOffset(ix+1)); if (normValue != null) { ac.setNormalizedValue(ix, normValue); } } }
/** * Method called to normalize value of an ID attribute, specified * using name xml:id, when support for Xml:id specification enabled. */ protected final void normalizeXmlIdAttr(AttributeCollector ac, int ix) { // StringUtil has a method, but it works on char arrays... TextBuilder attrBuilder = ac.getAttrBuilder(); char[] attrCB = attrBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, attrBuilder.getOffset(ix), attrBuilder.getOffset(ix+1)); if (normValue != null) { ac.setNormalizedValue(ix, normValue); } } }
/** * Method called to normalize value of an ID attribute, specified * using name xml:id, when support for Xml:id specification enabled. */ protected final void normalizeXmlIdAttr(AttributeCollector ac, int ix) { // StringUtil has a method, but it works on char arrays... TextBuilder attrBuilder = ac.getAttrBuilder(); char[] attrCB = attrBuilder.getCharBuffer(); String normValue = StringUtil.normalizeSpaces (attrCB, attrBuilder.getOffset(ix), attrBuilder.getOffset(ix+1)); if (normValue != null) { ac.setNormalizedValue(ix, normValue); } } }