Java Code Examples for com.sun.org.apache.xerces.internal.util.XML11Char#isXML11ValidName()
The following examples show how to use
com.sun.org.apache.xerces.internal.util.XML11Char#isXML11ValidName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XML11IDREFDatatypeValidator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Checks that "content" string is valid IDREF value. * If invalid a Datatype validation exception is thrown. * * @param content the string value that needs to be validated * @param context the validation context * @throws InvalidDatatypeException if the content is * invalid according to the rules for the validators * @see InvalidDatatypeValueException */ public void validate(String content, ValidationContext context) throws InvalidDatatypeValueException { //Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* if(context.useNamespaces()) { if (!XML11Char.isXML11ValidNCName(content)) { throw new InvalidDatatypeValueException("IDREFInvalidWithNamespaces", new Object[]{content}); } } else { if (!XML11Char.isXML11ValidName(content)) { throw new InvalidDatatypeValueException("IDREFInvalid", new Object[]{content}); } } context.addIdRef(content); }
Example 2
Source File: XML11IDDatatypeValidator.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Checks that "content" string is valid ID value. * If invalid a Datatype validation exception is thrown. * * @param content the string value that needs to be validated * @param context the validation context * @throws InvalidDatatypeException if the content is * invalid according to the rules for the validators * @see InvalidDatatypeValueException */ public void validate(String content, ValidationContext context) throws InvalidDatatypeValueException { //Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* if(context.useNamespaces()) { if (!XML11Char.isXML11ValidNCName(content)) { throw new InvalidDatatypeValueException("IDInvalidWithNamespaces", new Object[]{content}); } } else { if (!XML11Char.isXML11ValidName(content)) { throw new InvalidDatatypeValueException("IDInvalid", new Object[]{content}); } } if (context.isIdDeclared(content)) { throw new InvalidDatatypeValueException("IDNotUnique", new Object[]{content}); } context.addId(content); }
Example 3
Source File: XML11IDDatatypeValidator.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Checks that "content" string is valid ID value. * If invalid a Datatype validation exception is thrown. * * @param content the string value that needs to be validated * @param context the validation context * @throws InvalidDatatypeException if the content is * invalid according to the rules for the validators * @see InvalidDatatypeValueException */ public void validate(String content, ValidationContext context) throws InvalidDatatypeValueException { //Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* if(context.useNamespaces()) { if (!XML11Char.isXML11ValidNCName(content)) { throw new InvalidDatatypeValueException("IDInvalidWithNamespaces", new Object[]{content}); } } else { if (!XML11Char.isXML11ValidName(content)) { throw new InvalidDatatypeValueException("IDInvalid", new Object[]{content}); } } if (context.isIdDeclared(content)) { throw new InvalidDatatypeValueException("IDNotUnique", new Object[]{content}); } context.addId(content); }
Example 4
Source File: XML11IDREFDatatypeValidator.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Checks that "content" string is valid IDREF value. * If invalid a Datatype validation exception is thrown. * * @param content the string value that needs to be validated * @param context the validation context * @throws InvalidDatatypeException if the content is * invalid according to the rules for the validators * @see InvalidDatatypeValueException */ public void validate(String content, ValidationContext context) throws InvalidDatatypeValueException { //Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* if(context.useNamespaces()) { if (!XML11Char.isXML11ValidNCName(content)) { throw new InvalidDatatypeValueException("IDREFInvalidWithNamespaces", new Object[]{content}); } } else { if (!XML11Char.isXML11ValidName(content)) { throw new InvalidDatatypeValueException("IDREFInvalid", new Object[]{content}); } } context.addIdRef(content); }
Example 5
Source File: XML11IDDatatypeValidator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Checks that "content" string is valid ID value. * If invalid a Datatype validation exception is thrown. * * @param content the string value that needs to be validated * @param context the validation context * @throws InvalidDatatypeException if the content is * invalid according to the rules for the validators * @see InvalidDatatypeValueException */ public void validate(String content, ValidationContext context) throws InvalidDatatypeValueException { //Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* if(context.useNamespaces()) { if (!XML11Char.isXML11ValidNCName(content)) { throw new InvalidDatatypeValueException("IDInvalidWithNamespaces", new Object[]{content}); } } else { if (!XML11Char.isXML11ValidName(content)) { throw new InvalidDatatypeValueException("IDInvalid", new Object[]{content}); } } if (context.isIdDeclared(content)) { throw new InvalidDatatypeValueException("IDNotUnique", new Object[]{content}); } context.addId(content); }
Example 6
Source File: XML11IDDatatypeValidator.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Checks that "content" string is valid ID value. * If invalid a Datatype validation exception is thrown. * * @param content the string value that needs to be validated * @param context the validation context * @throws InvalidDatatypeException if the content is * invalid according to the rules for the validators * @see InvalidDatatypeValueException */ public void validate(String content, ValidationContext context) throws InvalidDatatypeValueException { //Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* if(context.useNamespaces()) { if (!XML11Char.isXML11ValidNCName(content)) { throw new InvalidDatatypeValueException("IDInvalidWithNamespaces", new Object[]{content}); } } else { if (!XML11Char.isXML11ValidName(content)) { throw new InvalidDatatypeValueException("IDInvalid", new Object[]{content}); } } if (context.isIdDeclared(content)) { throw new InvalidDatatypeValueException("IDNotUnique", new Object[]{content}); } context.addId(content); }
Example 7
Source File: XML11IDDatatypeValidator.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Checks that "content" string is valid ID value. * If invalid a Datatype validation exception is thrown. * * @param content the string value that needs to be validated * @param context the validation context * @throws InvalidDatatypeException if the content is * invalid according to the rules for the validators * @see InvalidDatatypeValueException */ public void validate(String content, ValidationContext context) throws InvalidDatatypeValueException { //Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* if(context.useNamespaces()) { if (!XML11Char.isXML11ValidNCName(content)) { throw new InvalidDatatypeValueException("IDInvalidWithNamespaces", new Object[]{content}); } } else { if (!XML11Char.isXML11ValidName(content)) { throw new InvalidDatatypeValueException("IDInvalid", new Object[]{content}); } } if (context.isIdDeclared(content)) { throw new InvalidDatatypeValueException("IDNotUnique", new Object[]{content}); } context.addId(content); }
Example 8
Source File: CoreDocumentImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Check the string against XML's definition of acceptable names for * elements and attributes and so on using the XMLCharacterProperties * utility class */ public static final boolean isXMLName(String s, boolean xml11Version) { if (s == null) { return false; } if(!xml11Version) return XMLChar.isValidName(s); else return XML11Char.isXML11ValidName(s); }
Example 9
Source File: CoreDocumentImpl.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Check the string against XML's definition of acceptable names for * elements and attributes and so on using the XMLCharacterProperties * utility class */ public static final boolean isXMLName(String s, boolean xml11Version) { if (s == null) { return false; } if(!xml11Version) return XMLChar.isValidName(s); else return XML11Char.isXML11ValidName(s); }
Example 10
Source File: CoreDocumentImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Check the string against XML's definition of acceptable names for * elements and attributes and so on using the XMLCharacterProperties * utility class */ public static final boolean isXMLName(String s, boolean xml11Version) { if (s == null) { return false; } if(!xml11Version) return XMLChar.isValidName(s); else return XML11Char.isXML11ValidName(s); }
Example 11
Source File: CoreDocumentImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Check the string against XML's definition of acceptable names for * elements and attributes and so on using the XMLCharacterProperties * utility class */ public static final boolean isXMLName(String s, boolean xml11Version) { if (s == null) { return false; } if(!xml11Version) return XMLChar.isValidName(s); else return XML11Char.isXML11ValidName(s); }
Example 12
Source File: CoreDocumentImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Check the string against XML's definition of acceptable names for * elements and attributes and so on using the XMLCharacterProperties * utility class */ public static final boolean isXMLName(String s, boolean xml11Version) { if (s == null) { return false; } if(!xml11Version) return XMLChar.isValidName(s); else return XML11Char.isXML11ValidName(s); }
Example 13
Source File: CoreDocumentImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Check the string against XML's definition of acceptable names for * elements and attributes and so on using the XMLCharacterProperties * utility class */ public static final boolean isXMLName(String s, boolean xml11Version) { if (s == null) { return false; } if(!xml11Version) return XMLChar.isValidName(s); else return XML11Char.isXML11ValidName(s); }
Example 14
Source File: XML11DTDProcessor.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected boolean isValidName(String name) { return XML11Char.isXML11ValidName(name); }
Example 15
Source File: XML11DTDProcessor.java From Bytecoder with Apache License 2.0 | 4 votes |
protected boolean isValidName(String name) { return XML11Char.isXML11ValidName(name); }
Example 16
Source File: XML11DTDProcessor.java From hottub with GNU General Public License v2.0 | 4 votes |
protected boolean isValidName(String name) { return XML11Char.isXML11ValidName(name); }
Example 17
Source File: XML11DTDProcessor.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected boolean isValidName(String name) { return XML11Char.isXML11ValidName(name); }
Example 18
Source File: XML11DTDProcessor.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected boolean isValidName(String name) { return XML11Char.isXML11ValidName(name); }
Example 19
Source File: XML11DTDProcessor.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
protected boolean isValidName(String name) { return XML11Char.isXML11ValidName(name); }
Example 20
Source File: XML11DTDProcessor.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected boolean isValidName(String name) { return XML11Char.isXML11ValidName(name); }