List of usage examples for org.jdom2 Verifier checkXMLName
public static String checkXMLName(final String name)
From source file:org.artifactory.webapp.wicket.util.validation.XsdNCNameValidator.java
License:Open Source License
@Override protected void onValidate(IValidatable validatable) { String value = (String) validatable.getValue(); String result = Verifier.checkXMLName(value); if (result != null) { ValidationError error = new ValidationError(); String message = errorMessage == null ? result : String.format(errorMessage, value); error.setMessage(message);// w w w . j a va 2s . c o m validatable.error(error); } }
From source file:org.mycore.frontend.xeditor.MCREditorSession.java
License:Open Source License
private void removeIllegalVariables() { for (Iterator<Entry<String, Object>> entries = variables.entrySet().iterator(); entries.hasNext();) { String name = entries.next().getKey(); String result = Verifier.checkXMLName(name); if (result != null) { LOGGER.warn("Illegally named transformation parameter, removing " + name); entries.remove();//from www .j a va2 s. c om } } }