/** * Get the display form of a name (the QName), given its name code or fingerprint * * @param nameCode the integer name code or fingerprint of a name in the name pool * @return the corresponding lexical QName (if a fingerprint was supplied, this will * simply be the local name) */ public String getDisplayName(int nameCode) { return getStructuredQName(nameCode).getDisplayName(); }
/** * Get the display form of a name (the QName), given its name code or fingerprint * * @param nameCode the integer name code or fingerprint of a name in the name pool * @return the corresponding lexical QName (if a fingerprint was supplied, this will * simply be the local name) */ public String getDisplayName(int nameCode) { return getStructuredQName(nameCode).getDisplayName(); }
private static void indexByQName(NamePool pool, IntHashMap<RuleChain> indexByFP, Map<StructuredQName, RuleChain> indexByQN) { IntIterator ii = indexByFP.keyIterator(); while (ii.hasNext()) { int fp = ii.next(); RuleChain eChain = indexByFP.get(fp); StructuredQName name = pool.getStructuredQName(fp); indexByQN.put(name, eChain); } }
private static void indexByQName(NamePool pool, IntHashMap<RuleChain> indexByFP, Map<StructuredQName, RuleChain> indexByQN) { IntIterator ii = indexByFP.keyIterator(); while (ii.hasNext()) { int fp = ii.next(); RuleChain eChain = indexByFP.get(fp); StructuredQName name = pool.getStructuredQName(fp); indexByQN.put(name, eChain); } }
private QName qnameForNameCode(int nameCode) { StructuredQName sqname = config.getNamePool().getStructuredQName(nameCode); String prefix = sqname.getPrefix(); String namespace = sqname.getURI(); if (StringUtils.isBlank(prefix) && StringUtils.isNotBlank(namespace)) { prefix = getPrefixForNamespace(namespace); } return new QName (namespace, sqname.getLocalPart(), prefix); }
/** * Get the value of the attribute with a given fingerprint. * * @param fp the fingerprint of the required attribute * @return the string value of the attribute if present, or null if absent */ public String getAttributeValue(int fp) { NodeInfo actual = externalNodeCopy.getOriginalNode(); if (actual instanceof TinyElementImpl) { return ((TinyElementImpl) actual).getAttributeValue(fp); } else { StructuredQName qn = getNamePool().getStructuredQName(fp); return actual.getAttributeValue(qn.getURI(), qn.getLocalPart()); } }
/** * Get the value of the attribute with a given fingerprint. * * @param fp the fingerprint of the required attribute * @return the string value of the attribute if present, or null if absent */ public String getAttributeValue(int fp) { NodeInfo actual = externalNodeCopy.getOriginalNode(); if (actual instanceof TinyElementImpl) { return ((TinyElementImpl) actual).getAttributeValue(fp); } else { StructuredQName qn = getNamePool().getStructuredQName(fp); return actual.getAttributeValue(qn.getURI(), qn.getLocalPart()); } }
int code = test.getFingerprint(); if (code >= 0) { StructuredQName name = ctx.getNamePool().getStructuredQName(code);
if (schemaType == null) { if (warnings) { StructuredQName childElement = getConfiguration().getNamePool().getStructuredQName(childfp); String message = "The complex type " + contentType.getDescription() + " does not allow a child element named " + getDiagnosticName(childElement, env); while (kids.hasNext()) { int kid = kids.next(); StructuredQName sq = getConfiguration().getNamePool().getStructuredQName(kid); if (sq.getLocalPart().equals(childElement.getLocalPart()) && kid != childfp) { message += ". Perhaps the namespace is " + StructuredQName childElement = getConfiguration().getNamePool().getStructuredQName(childfp); visitor.issueWarning( "The complex type " + contentType.getDescription() +
if (schemaType == null) { if (warnings) { StructuredQName childElement = getConfiguration().getNamePool().getStructuredQName(childfp); String message = "The complex type " + contentType.getDescription() + " does not allow a child element named " + getDiagnosticName(childElement, env); while (kids.hasNext()) { int kid = kids.next(); StructuredQName sq = getConfiguration().getNamePool().getStructuredQName(kid); if (sq.getLocalPart().equals(childElement.getLocalPart()) && kid != childfp) { message += ". Perhaps the namespace is " + StructuredQName childElement = getConfiguration().getNamePool().getStructuredQName(childfp); visitor.issueWarning( "The complex type " + contentType.getDescription() +