// create an assertion object
XSAssertImpl assertImpl = new XSAssertImpl(typeDef,
annotations,
fSchemaHandler);
Test testExpr = new Test(new XPath20Assert(test, fSymbolTable,
new SchemaNamespaceSupport(schemaDoc.
fNamespaceSupport)), assertImpl);
assertImpl.setAssertKind(XSConstants.ASSERTION_FACET);
assertImpl.setTest(testExpr);
assertImpl.setXPathDefaultNamespace(xpathDefaultNamespace);
assertImpl.setXPath2NamespaceContext(new SchemaNamespaceSupport
(schemaDoc.fNamespaceSupport));
String assertMessage = XMLChar.trim(content.getAttributeNS(
SchemaSymbols.URI_XERCES_EXTENSIONS,
SchemaSymbols.ATT_ASSERT_MESSAGE));
if (!"".equals(assertMessage)) {