Methods Summary |
---|
public void | cdata(org.w3c.dom.CDATASection node)
|
public void | characters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)
if (!fIgnoreChars) {
final Element currentElement = (Element) fDOMValidatorHelper.getCurrentElement();
currentElement.appendChild(fDocument.createTextNode(text.toString()));
}
|
public void | characters(org.w3c.dom.Text node)
|
public void | comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)
|
public void | comment(org.w3c.dom.Comment node)
|
public void | doctypeDecl(java.lang.String rootElement, java.lang.String publicId, java.lang.String systemId, org.apache.xerces.xni.Augmentations augs)
|
public void | doctypeDecl(org.w3c.dom.DocumentType node)
|
public void | emptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)
startElement(element, attributes, augs);
endElement(element, augs);
|
public void | endCDATA(org.apache.xerces.xni.Augmentations augs)
|
public void | endDocument(org.apache.xerces.xni.Augmentations augs)
|
public void | endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs)
final Node currentElement = fDOMValidatorHelper.getCurrentElement();
// Write type information to this element
if (augs != null && fDocumentImpl != null) {
ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI);
if (elementPSVI != null) {
if (fStorePSVI) {
((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI);
}
XSTypeDefinition type = elementPSVI.getMemberTypeDefinition();
if (type == null) {
type = elementPSVI.getTypeDefinition();
}
((ElementNSImpl) currentElement).setType(type);
}
}
|
public void | endGeneralEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs)
|
public org.apache.xerces.xni.parser.XMLDocumentSource | getDocumentSource()
return null;
|
public void | ignorableWhitespace(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)
characters(text, augs);
|
private boolean | processAttributePSVI(org.apache.xerces.dom.AttrImpl attr, org.apache.xerces.xs.AttributePSVI attrPSVI)Returns whether the given attribute is an ID type.
if (fStorePSVI) {
((PSVIAttrNSImpl) attr).setPSVI (attrPSVI);
}
Object type = attrPSVI.getMemberTypeDefinition ();
if (type == null) {
type = attrPSVI.getTypeDefinition ();
if (type != null) {
attr.setType(type);
return ((XSSimpleType) type).isIDType();
}
}
else {
attr.setType(type);
return ((XSSimpleType) type).isIDType();
}
return false;
|
public void | processingInstruction(java.lang.String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs)
|
public void | processingInstruction(org.w3c.dom.ProcessingInstruction node)
|
public void | setDOMResult(javax.xml.transform.dom.DOMResult result)
fIgnoreChars = false;
if (result != null) {
final Node target = result.getNode();
fDocument = (target.getNodeType() == Node.DOCUMENT_NODE) ? (Document) target : target.getOwnerDocument();
fDocumentImpl = (fDocument instanceof CoreDocumentImpl) ? (CoreDocumentImpl) fDocument : null;
fStorePSVI = (fDocument instanceof PSVIDocumentImpl);
return;
}
fDocument = null;
fDocumentImpl = null;
fStorePSVI = false;
|
public void | setDocumentSource(org.apache.xerces.xni.parser.XMLDocumentSource source)
|
public void | setIgnoringCharacters(boolean ignore)
fIgnoreChars = ignore;
|
public void | startCDATA(org.apache.xerces.xni.Augmentations augs)
|
public void | startDocument(org.apache.xerces.xni.XMLLocator locator, java.lang.String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs)
|
public void | startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)
final Element currentElement = (Element) fDOMValidatorHelper.getCurrentElement();
final NamedNodeMap attrMap = currentElement.getAttributes();
final int oldLength = attrMap.getLength();
// If it's a Xerces DOM store type information for attributes, set idness, etc..
if (fDocumentImpl != null) {
AttrImpl attr;
for (int i = 0; i < oldLength; ++i) {
attr = (AttrImpl) attrMap.item(i);
// write type information to this attribute
AttributePSVI attrPSVI = (AttributePSVI) attributes.getAugmentations(i).getItem (Constants.ATTRIBUTE_PSVI);
if (attrPSVI != null) {
if (processAttributePSVI(attr, attrPSVI)) {
((ElementImpl) currentElement).setIdAttributeNode (attr, true);
}
}
}
}
final int newLength = attributes.getLength();
// Add default/fixed attributes
if (newLength > oldLength) {
if (fDocumentImpl == null) {
for (int i = oldLength; i < newLength; ++i) {
attributes.getName(i, fAttributeQName);
currentElement.setAttributeNS(fAttributeQName.uri, fAttributeQName.rawname, attributes.getValue(i));
}
}
// If it's a Xerces DOM store type information for attributes, set idness, etc..
else {
for (int i = oldLength; i < newLength; ++i) {
attributes.getName(i, fAttributeQName);
AttrImpl attr = (AttrImpl) fDocumentImpl.createAttributeNS(fAttributeQName.uri,
fAttributeQName.rawname, fAttributeQName.localpart);
attr.setValue(attributes.getValue(i));
currentElement.setAttributeNodeNS(attr);
// write type information to this attribute
AttributePSVI attrPSVI = (AttributePSVI) attributes.getAugmentations(i).getItem (Constants.ATTRIBUTE_PSVI);
if (attrPSVI != null) {
if (processAttributePSVI(attr, attrPSVI)) {
((ElementImpl) currentElement).setIdAttributeNode (attr, true);
}
}
attr.setSpecified(false);
}
}
}
|
public void | startGeneralEntity(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs)
|
public void | textDecl(java.lang.String version, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs)
|
public void | xmlDecl(java.lang.String version, java.lang.String encoding, java.lang.String standalone, org.apache.xerces.xni.Augmentations augs)
|