221222223224225226227228229230231
if (schemaValidation) { XSD xsd = version == 1 ? XSD.PORTLET_1_0 : XSD.PORTLET_2_0; try { xsd.validate(new StreamSource(new ByteArrayInputStream(bytes))); } catch (Exception e) { throw new DeploymentException("The portlet.xml file is not valid XML", e); }
201202203204205206207208209210211
// Perform schema validation if required if (schemaValidation) { XSD xsd = version == 1 ? XSD.PORTLET_1_0 : XSD.PORTLET_2_0; xsd.validate(new StreamSource(new ByteArrayInputStream(bytes))); } // assert Element.portlet_app == nav.getName();