/** * Creator for use when the XML violation policy requires an attribute name * to be changed. * * @param name * the name of the attribute to create */ static AttributeName create(@Local String name) { return new AttributeName(AttributeName.ALL_NO_NS, AttributeName.SAME_LOCAL(name), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); }
/** * Creator for use when the XML violation policy requires an attribute name * to be changed. * * @param name * the name of the attribute to create */ static AttributeName create(@Local String name) { return new AttributeName(AttributeName.ALL_NO_NS, AttributeName.SAME_LOCAL(name), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); }
/** * Creator for use when the XML violation policy requires an attribute name * to be changed. * * @param name * the name of the attribute to create */ static AttributeName create(@Local String name) { return new AttributeName(AttributeName.ALL_NO_NS, AttributeName.SAME_LOCAL(name), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); }
/** * Creates an <code>AttributeName</code> for a local name. * * @param name * the name * @param checkNcName * whether to check ncnameness * @return an <code>AttributeName</code> */ static AttributeName createAttributeName(@Local String name // [NOCPP[ , boolean checkNcName // ]NOCPP] ) { // [NOCPP[ int flags = NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG; if (name.startsWith("xmlns:")) { flags = IS_XMLNS; } else if (checkNcName && !NCName.isNCName(name)) { flags = 0; } // ]NOCPP] return new AttributeName(AttributeName.ALL_NO_NS, AttributeName.SAME_LOCAL(name), ALL_NO_PREFIX, flags); }
/** * Creates an <code>AttributeName</code> for a local name. * * @param name * the name * @param checkNcName * whether to check ncnameness * @return an <code>AttributeName</code> */ private static AttributeName createAttributeName(@Local String name // [NOCPP[ , boolean checkNcName // ]NOCPP] ) { // [NOCPP[ int flags = NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG; if (name.startsWith("xmlns:")) { flags = IS_XMLNS; } else if (checkNcName && !NCName.isNCName(name)) { flags = 0; } // ]NOCPP] return new AttributeName(AttributeName.ALL_NO_NS, AttributeName.SAME_LOCAL(name), ALL_NO_PREFIX, flags); }
/** * Creates an <code>AttributeName</code> for a local name. * * @param name * the name * @param checkNcName * whether to check ncnameness * @return an <code>AttributeName</code> */ static AttributeName createAttributeName(@Local String name // [NOCPP[ , boolean checkNcName // ]NOCPP] ) { // [NOCPP[ int flags = NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG; if (name.startsWith("xmlns:")) { flags = IS_XMLNS; } else if (checkNcName && !NCName.isNCName(name)) { flags = 0; } // ]NOCPP] return new AttributeName(AttributeName.ALL_NO_NS, AttributeName.SAME_LOCAL(name), ALL_NO_PREFIX, flags); }