code: protected final void decodeAttributeXsiTypeStructure() throws EXIException,
  			IOException {
  		attributeQNameContext = getXsiTypeContext();
  		// handle AT prefix
  		handleAttributePrefix(attributeQNameContext);
  
  		QNameContext qncType = null;
  
  		// read xsi:type content
  		if (this.preserveLexicalValues) {
  			// assert(preservePrefix); // Note: requirement
  			attributeValue = typeDecoder.readValue(
  					BuiltIn.getDefaultDatatype(), getXsiTypeContext(), channel,
  					stringDecoder);
  			String sType = attributeValue.toString();
  			// extract prefix
  			String qncTypePrefix = QNameUtilities.getPrefixPart(sType);
  
  			// URI
  			String qnameURI = getURI(qncTypePrefix);
  
  			RuntimeUriContext uc = getUri(qnameURI);
  			if (uc != null) {
  				// local-name
  				String qnameLocalName = QNameUtilities.getLocalPart(sType);
  				qncType = uc.getQNameContext(qnameLocalName);
  			}
  		} else {
  			// typed
  			qncType = decodeQName(channel);
  			String qncTypePrefix;
  			if (preservePrefix) {
  				qncTypePrefix = decodeQNamePrefix(
  						getUri(qncType.getNamespaceUriID()), channel);
  			} else {
  				checkDefaultPrefixNamespaceDeclaration(qncType);
  				qncTypePrefix = qncType.getDefaultPrefix();
  			}
  			attributeValue = new QNameValue(qncType.getNamespaceUri(),
  					qncType.getLocalName(), qncTypePrefix);
  		}
  
  		// update grammar according to given xsi:type
  		if (qncType != null && qncType.getTypeGrammar() != null) {
  			// update current rule
  			updateCurrentRule(qncType.getTypeGrammar());
  		}
  	}
docs: /*
  Handles and xsi:type attributes