/** * Unmarshalls the XSI type, schemaLocation, and noNamespaceSchemaLocation attributes. * * @param xmlObject the xmlObject to recieve the namespace decleration * @param attribute the namespace decleration attribute */ protected void unmarshallSchemaInstanceAttributes(XMLObject xmlObject, Attr attribute) { QName attribName = XMLHelper.getNodeQName(attribute); if (XMLConstants.XSI_TYPE_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:type of: {}", xmlObject.getElementQName(), attribute.getValue()); } else if (XMLConstants.XSI_SCHEMA_LOCATION_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:schemaLocation of: {}", xmlObject.getElementQName(), attribute.getValue()); xmlObject.setSchemaLocation(attribute.getValue()); } else if (XMLConstants.XSI_NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:noNamespaceSchemaLocation of: {}", xmlObject.getElementQName(), attribute.getValue()); xmlObject.setNoNamespaceSchemaLocation(attribute.getValue()); } else if (XMLConstants.XSI_NIL_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:nil of: {}", xmlObject.getElementQName(), attribute.getValue()); xmlObject.setNil(XSBooleanValue.valueOf(attribute.getValue())); } }
/** * Unmarshalls the XSI type, schemaLocation, and noNamespaceSchemaLocation attributes. * * @param xmlObject the xmlObject to recieve the namespace decleration * @param attribute the namespace decleration attribute */ protected void unmarshallSchemaInstanceAttributes(XMLObject xmlObject, Attr attribute) { QName attribName = XMLHelper.getNodeQName(attribute); if (XMLConstants.XSI_TYPE_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:type of: {}", xmlObject.getElementQName(), attribute.getValue()); } else if (XMLConstants.XSI_SCHEMA_LOCATION_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:schemaLocation of: {}", xmlObject.getElementQName(), attribute.getValue()); xmlObject.setSchemaLocation(attribute.getValue()); } else if (XMLConstants.XSI_NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:noNamespaceSchemaLocation of: {}", xmlObject.getElementQName(), attribute.getValue()); xmlObject.setNoNamespaceSchemaLocation(attribute.getValue()); } else if (XMLConstants.XSI_NIL_ATTRIB_NAME.equals(attribName)) { log.trace("Saw XMLObject {} with an xsi:nil of: {}", xmlObject.getElementQName(), attribute.getValue()); xmlObject.setNil(XSBooleanValue.valueOf(attribute.getValue())); } }