public void prepareAttributes() throws XPathException { AttributeCollection atts = getAttributeList(); String validationAtt = null; String typeAtt = null; for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("validation")) { validationAtt = Whitespace.trim(atts.getValue(a)); } else if (f.equals("type")) { typeAtt = Whitespace.trim(atts.getValue(a)); } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (validationAtt == null) { validationAction = getDefaultValidation(); } else { validationAction = validateValidationAttribute(validationAtt); } if (typeAtt != null) { if (!isSchemaAware()) { compileError("The @type attribute is available only with a schema-aware XSLT processor", "XTSE1660"); } schemaType = getSchemaType(typeAtt); validationAction = Validation.BY_TYPE; } if (typeAtt != null && validationAtt != null) { compileError("The @validation and @type attributes are mutually exclusive", "XTSE1505"); } }
public void prepareAttributes() throws XPathException { AttributeCollection atts = getAttributeList(); String validationAtt = null; String typeAtt = null; for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("validation")) { validationAtt = Whitespace.trim(atts.getValue(a)); } else if (f.equals("type")) { typeAtt = Whitespace.trim(atts.getValue(a)); } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (validationAtt == null) { validationAction = getDefaultValidation(); } else { validationAction = validateValidationAttribute(validationAtt); } if (typeAtt != null) { if (!isSchemaAware()) { compileError("The @type attribute is available only with a schema-aware XSLT processor", "XTSE1660"); } schemaType = getSchemaType(typeAtt); validationAction = Validation.BY_TYPE; } if (typeAtt != null && validationAtt != null) { compileError("The @validation and @type attributes are mutually exclusive", "XTSE1505"); } }