* The following information will be available at the endElement call:
* nil, specified, normalized value, member type, validity, error codes,
* default
*/
public void printPSVIEndElement(Augmentations augs) {
ElementPSVI elemPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI);
if (elemPSVI != null) {
printElement("psv:validationContext",elemPSVI.getValidationContext());
short validity = elemPSVI.getValidity();
if (validity == ItemPSVI.VALIDITY_NOTKNOWN) {
printElement("psv:validity","unknown");
}
else if (validity == ItemPSVI.VALIDITY_VALID) {
printElement("psv:validity","valid");
}
else if (validity == ItemPSVI.VALIDITY_INVALID) {
printElement("psv:validity","invalid");
}
short validation = elemPSVI.getValidationAttempted();
if (validation == ItemPSVI.VALIDATION_NONE) {
printElement("psv:validationAttempted","none");
return;
}
else if (validation == ItemPSVI.VALIDATION_PARTIAL) {
printElement("psv:validationAttempted","partial");
}
else if (validation == ItemPSVI.VALIDATION_FULL) {
printElement("psv:validationAttempted","full");
}
XSTypeDefinition type = elemPSVI.getTypeDefinition();
short definationType = type.getTypeCategory();
if (definationType == XSTypeDefinition.SIMPLE_TYPE) {
printElement("psv:typeDefinitionType","simple");
}
else if (definationType == XSTypeDefinition.COMPLEX_TYPE) {
printElement("psv:typeDefinitionType","complex");
}
printElement("psv:typeDefinitionNamespace ",type.getNamespace());
printElement("psv:typeDefinitionAnonymous",String.valueOf(type.getAnonymous()));
printElement("psv:typeDefinitionName",type.getName());
XSSimpleTypeDefinition memtype = elemPSVI.getMemberTypeDefinition();
if (memtype != null) {
printElement("psv:memberTypeDefinitionAnonymous",String.valueOf(memtype.getAnonymous()));
printElement("psv:memberTypeDefinitionName",memtype.getName());
printElement("psv:memberTypeDefinitionNamespace",memtype.getNamespace());
}
XSNotationDeclaration notation = elemPSVI.getNotation();
if (notation != null) {
printElement("psv:notationSystem",notation.getSystemId());
printElement("psv:notationPublic",notation.getPublicId());
}
//revisit
StringList errorCode = elemPSVI.getErrorCodes();
if (errorCode != null) {
for (int i=0;i<errorCode.getLength();i++) {
fErrorBuffer.append(errorCode.item(i));
}
printElement("psv:schemaErrorCode",fErrorBuffer.toString());
fErrorBuffer.setLength(0);
}
else {
printElement("psv:schemaErrorCode","");
}
//printElement("psv:nil", String.valueOf(elemPSVI.getIsNil()));
printElement("psv:schemaNormalizedValue",elemPSVI.getSchemaNormalizedValue());
String specified = elemPSVI.getIsSchemaSpecified()?"schema":"infoset";
printElement("psv:schemaSpecified",specified);
}
}