/** * Notifies of the presence of the DOCTYPE line in the document. * * @param rootElement The name of the root element. * @param publicId The public identifier if an external DTD or null * if the external DTD is specified using SYSTEM. * @param systemId The system identifier if an external DTD, null * otherwise. * @param augs Additional information that may include infoset augmentations * * @throws XNIException Thrown by handler to signal an error. */ public void doctypeDecl (String rootElement, String publicId, String systemId, Augmentations augs) throws XNIException { if (!fDeferNodeExpansion) { if (fDocumentImpl != null) { fDocumentType = fDocumentImpl.createDocumentType ( rootElement, publicId, systemId); fCurrentNode.appendChild (fDocumentType); } } else { fDocumentTypeIndex = fDeferredDocumentImpl. createDeferredDocumentType (rootElement, publicId, systemId); fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, fDocumentTypeIndex); } } // doctypeDecl(String,String,String)
/** Inserts a child before the specified node in the table. */ public int insertBefore(int parentIndex, int newChildIndex, int refChildIndex) { if (refChildIndex == -1) { appendChild(parentIndex, newChildIndex); return newChildIndex; } int nchunk = newChildIndex >> CHUNK_SHIFT; int nindex = newChildIndex & CHUNK_MASK; int rchunk = refChildIndex >> CHUNK_SHIFT; int rindex = refChildIndex & CHUNK_MASK; int previousIndex = getChunkIndex(fNodePrevSib, rchunk, rindex); setChunkIndex(fNodePrevSib, newChildIndex, rchunk, rindex); setChunkIndex(fNodePrevSib, previousIndex, nchunk, nindex); return newChildIndex; } // insertBefore(int,int,int):int
int pi = fDeferredDocumentImpl. createDeferredProcessingInstruction (target, data.toString ()); fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, pi);
int entityIndex = fDeferredDocumentImpl.createDeferredEntity (name, null, null, null, (String)fBaseURIStack.peek ()); fDeferredDocumentImpl.appendChild (fDocumentTypeIndex, entityIndex);
int comment = fDeferredDocumentImpl.createDeferredComment (text.toString ()); fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, comment);
createDeferredCDATASection (text.toString ()); fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, cs); fCurrentCDATASectionIndex = cs; fCurrentNodeIndex = cs; int txt = fDeferredDocumentImpl. createDeferredTextNode (text.toString (), false); fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, txt); int txt = fDeferredDocumentImpl. createDeferredTextNode (value, false); fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, txt);
fDeferredDocumentImpl.appendChild (fDocumentTypeIndex, elementDefIndex); fDeferredDocumentImpl.appendChild (elementDefIndex, attrIndex);
int entityIndex = fDeferredDocumentImpl.createDeferredEntity ( name, publicId, literalSystemId, null, identifier.getBaseSystemId ()); fDeferredDocumentImpl.appendChild (fDocumentTypeIndex, entityIndex);
fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, txt);
int entityIndex = fDeferredDocumentImpl.createDeferredEntity ( name, publicId, literalSystemId, notation, identifier.getBaseSystemId ()); fDeferredDocumentImpl.appendChild (fDocumentTypeIndex, entityIndex);
int notationIndex = fDeferredDocumentImpl.createDeferredNotation ( name, publicId, literalSystemId, identifier.getBaseSystemId ()); fDeferredDocumentImpl.appendChild (fDocumentTypeIndex, notationIndex);
fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, er); fCurrentNodeIndex = er;
fDeferredDocumentImpl.appendChild (fCurrentNodeIndex, el); fCurrentNodeIndex = el;