title: XML Schema validation containing ASSERT Tag
body: <p>I am trying to validate a XML instance with a XML Schema which contains an <code>assert</code> tag in it. The validator throws an exception containing the message:</p>
  
  <blockquote>
    <p>The content of '#AnonType_message' is invalid.  Element 'assert' is invalid, misplaced, or occurs too often.</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>//xmlData is a xml string
  Source xmlFile = new StreamSource(new StringReader( xmlData ));
  
  SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  
  Schema schema = schemaFactory.newSchema(schemaFile);
  Validator validator = schema.newValidator();
  
  validator.validate(xmlFile);
  </code></pre>
  
  <p>This is the parser's error message:</p>
  
  <blockquote>
    <p>org.xml.sax.SAXParseException</p>
  </blockquote>