<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi everyone,<div><br></div><div>I trying to validate some of the xml files found in the configuration folder of shibboleth (e.g, relying-party.xml) using Xerces, XOM and javax.xml.* but when I load the xsd files mentioned in the relying-party.xml file, it keeps asking for more and more xsd files that are not mention in the previous xml file. So the question is, how do you guys validate the xmls in shibboleth, what is the class that does this in order to check the logic.</div><div><br></div><div>The code I'm using is this:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> SAXParserFactory factory = SAXParserFactory.newInstance();</div><div> factory.setValidating(false);</div><div> factory.setNamespaceAware(true);</div><div><br></div><div> SchemaFactory schemaFactory = SchemaFactory.newInstance("<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>");</div><div> factory.setSchema(schemaFactory.newSchema(new Source[]{ <b> // <- After this line a SAXException is thrown saying: Cannot resolve the name '<some element>' to a(n) 'element declaration' component. </b></div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/shibboleth-2.0-resource.xsd")),</div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/shibboleth-2.0-services.xsd")),</div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/saml-schema-metadata-2.0.xsd")),</div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/shibboleth-2.0-relying-party.xsd")),</div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/shibboleth-2.0-relying-party-saml.xsd")),</div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/shibboleth-2.0-metadata.xsd")),</div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/shibboleth-2.0-security.xsd")),</div><div> new StreamSource(this.getClass().getClassLoader().getResourceAsStream("schema/shibboleth-2.0-security-policy-saml.xsd")),</div><div> }));</div><div><br></div><div> SAXParser parser = factory.newSAXParser();</div><div> XMLReader reader = parser.getXMLReader();</div><div><br></div><div> Builder builder = new Builder(reader);</div><div> builder.build(new File("relying-party.xml")); </div><div><br></div><div>Thanks for all the help.</div></body></html>