else
{
doc = FormValidationDocument.Factory.newInstance();
}
XmlDocumentProperties dp = doc.documentProperties();
if ( dp.getDoctypeName() == null )
{
dp.setDoctypeName( "form-validation" ); // NOI18N
}
if ( dp.getDoctypePublicId() == null )
{
if ( _validatorVersion.equals( ValidatorVersion.oneZero ) )
{
dp.setDoctypePublicId( "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" );
}
else
{
dp.setDoctypePublicId( "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN" );
}
}
if ( dp.getDoctypeSystemId() == null )
{
if ( _validatorVersion.equals( ValidatorVersion.oneZero ) )
{
dp.setDoctypeSystemId( "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd" );
}
else
{
dp.setDoctypeSystemId( "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd" );
}
}
FormValidationDocument.FormValidation formValidationElement = doc.getFormValidation();