private void rule2 ( ) { if ( ! ( parent instanceof XsdSchema ) && name != null ) { throw new ParsingException ( XSD_TAG + " element: The " + NAME_TAG + " should only be used when the parent of the " + XSD_TAG + " is the " + XsdSchema . XSD_TAG + " element." ) ; } }
Asserts if the current object has the name attribute when not being a direct child of the XsdSchema element which is not allowed throwing an exception in that case .