/** Constructs a content model leaf. */ public CMLeaf(QName element) { super(XMLContentSpec.CONTENTSPECNODE_LEAF); // Store the element index and position fElement.setValues(element); }
/** * Pops an element off of the stack by setting the values of * the specified QName. * <p> * <strong>Note:</strong> The object returned is <em>not</em> * orphaned to the caller. Therefore, the caller should consider * the object to be read-only. */ public void popElement(QName element) { element.setValues(fElements[--fSize]); } // popElement(QName)
/** * Sets the name of the attribute at the specified index. * * @param attrIndex The attribute index. * @param attrName The new attribute name. */ public void setName(int attrIndex, QName attrName) { fAttributes[attrIndex].name.setValues(attrName); } // setName(int,QName)
/** Constructs a content model leaf. */ public CMLeaf(QName element, int position) { super(XMLContentSpec.CONTENTSPECNODE_LEAF); // Store the element index and position fElement.setValues(element); fPosition = position; }
/** * Sets the fields in the given QName structure with the values * of the attribute name at the specified index. * * @param attrIndex The attribute index. * @param attrName The attribute name structure to fill in. */ public void getName(int attrIndex, QName attrName) { attrName.setValues(fAttributes[attrIndex].name); } // getName(int,QName)
/** Constructs a node test of type QName. */ public NodeTest(QName name) { this.type = QNAME; this.name.setValues(name); } // <init>(QName) /** Constructs a node test of type Namespace. */
/** Constructs a node test of type Namespace. */ public NodeTest(String prefix, String uri) { this.type = NAMESPACE; this.name.setValues(prefix, null, null, uri); } // <init>(String,String)
/** Copy constructor. */ public NodeTest(NodeTest nodeTest) { type = nodeTest.type; name.setValues(nodeTest.name); } // <init>(NodeTest)
/** Constructs a QName with the specified values. */ public QName(String prefix, String localpart, String rawname, String uri) { setValues(prefix, localpart, rawname, uri); } // <init>(String,String,String,String)
/** Constructs a copy of the specified QName. */ public QName(QName qname) { setValues(qname); } // <init>(QName)
fErrorReporter.reportWarning("HTML2009", new Object[]{hname,bname}); fQName.setValues(null, hname, hname, null); endElement(fQName, synthesizedAugs()); insertBody = true;
/** * setValues * * @param name * @param simpleType * @param optional */ public void setValues(QName name, XMLSimpleType simpleType, boolean optional) { this.name.setValues(name); this.simpleType.setValues(simpleType); this.optional = optional; } // setValues
protected void setElementDecl(int elementDeclIndex, XMLElementDecl elementDecl) { if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) { return; } int chunk = elementDeclIndex >> CHUNK_SHIFT; int index = elementDeclIndex & CHUNK_MASK; fElementDeclName[chunk][index].setValues(elementDecl.name); fElementDeclType[chunk][index] = elementDecl.type; fElementDeclContentModelValidator[chunk][index] = elementDecl.contentModelValidator; if (elementDecl.simpleType.list == true ) { fElementDeclType[chunk][index] |= LIST_FLAG; } fElementIndexMap.put(elementDecl.name.rawname, elementDeclIndex); }
/** * setValues * * @param name * @param scope * @param type * @param contentModelValidator * @param simpleType */ public void setValues(QName name, int scope, short type, ContentModelValidator contentModelValidator, XMLSimpleType simpleType) { this.name.setValues(name); this.scope = scope; this.type = type; this.contentModelValidator = contentModelValidator; this.simpleType.setValues(simpleType); } // setValues
/** Synthesize namespace binding. */ protected void synthesizeBinding(XMLAttributes attrs, String ns) { String prefix = "xmlns"; String localpart = ns; String qname = prefix+':'+localpart; String uri = NamespaceBinder.NAMESPACES_URI; String atype = "CDATA"; String avalue = SYNTHESIZED_NAMESPACE_PREFX+fSynthesizedNamespaceCount++; // add attribute fQName.setValues(prefix, localpart, qname, uri); attrs.addAttribute(fQName, atype, avalue); // bind namespace XercesBridge.getInstance().NamespaceContext_declarePrefix(fNamespaceContext, ns, avalue); } // synthesizeBinding(XMLAttributes,String)
/** Synthesize namespace binding. */ protected void synthesizeBinding(XMLAttributes attrs, String ns) { String prefix = "xmlns"; String localpart = ns; String qname = prefix+':'+localpart; String uri = NamespaceBinder.NAMESPACES_URI; String atype = "CDATA"; String avalue = SYNTHESIZED_NAMESPACE_PREFX+fSynthesizedNamespaceCount++; // add attribute fQName.setValues(prefix, localpart, qname, uri); attrs.addAttribute(fQName, atype, avalue); // bind namespace XercesBridge.getInstance().NamespaceContext_declarePrefix(fNamespaceContext, ns, avalue); } // synthesizeBinding(XMLAttributes,String)
/** * Synthesize namespace binding. */ protected void synthesizeBinding(XMLAttributes attrs, String ns) { String prefix = "xmlns"; String localpart = ns; String qname = prefix + ':' + localpart; String uri = NamespaceBinder.NAMESPACES_URI; String atype = "CDATA"; String avalue = SYNTHESIZED_NAMESPACE_PREFX + fSynthesizedNamespaceCount++; // add attribute fQName.setValues(prefix, localpart, qname, uri); attrs.addAttribute(fQName, atype, avalue); // bind namespace XercesBridge.getInstance().NamespaceContext_declarePrefix(fNamespaceContext, ns, avalue); } // synthesizeBinding(XMLAttributes,String)
/** * Synthesize namespace binding. */ protected void synthesizeBinding(XMLAttributes attrs, String ns) { String prefix = "xmlns"; String localpart = ns; String qname = prefix + ':' + localpart; String uri = NamespaceBinder.NAMESPACES_URI; String atype = "CDATA"; String avalue = SYNTHESIZED_NAMESPACE_PREFX + fSynthesizedNamespaceCount++; // add attribute fQName.setValues(prefix, localpart, qname, uri); attrs.addAttribute(fQName, atype, avalue); // bind namespace XercesBridge.getInstance().NamespaceContext_declarePrefix(fNamespaceContext, ns, avalue); } // synthesizeBinding(XMLAttributes,String)
/** Fills in a QName object. */ final void fillQName(QName toFill, String uri, String localpart, String prefix) { uri = (uri != null && uri.length() > 0) ? fSymbolTable.addSymbol(uri) : null; localpart = (localpart != null) ? fSymbolTable.addSymbol(localpart) : XMLSymbols.EMPTY_STRING; prefix = (prefix != null && prefix.length() > 0) ? fSymbolTable.addSymbol(prefix) : XMLSymbols.EMPTY_STRING; String raw = localpart; if (prefix != XMLSymbols.EMPTY_STRING) { fStringBuffer.clear(); fStringBuffer.append(prefix); fStringBuffer.append(':'); fStringBuffer.append(localpart); raw = fSymbolTable.addSymbol(fStringBuffer.ch, fStringBuffer.offset, fStringBuffer.length); } toFill.setValues(prefix, localpart, raw, uri); }