src/main/java/org/xmlet/xsdparser/xsdelements/XsdExtension.java
@Override
    public void replaceUnsolvedElements(NamedConcreteElement element) {
        super.replaceUnsolvedElements(element);

        XsdNamedElements elem = element.getElement();
        String elemName = elem.getRawName();

        boolean isComplexOrSimpleType = elem instanceof XsdComplexType || elem instanceof XsdSimpleType;

        if (this.base instanceof UnsolvedReference && isComplexOrSimpleType && ((UnsolvedReference) this.base).getRef().equals(elemName)){
            this.base = element;
        }

        if (this.childElement instanceof UnsolvedReference &&
                elem instanceof XsdGroup && ((UnsolvedReference) this.childElement).getRef().equals(elemName)){
            this.childElement = element;
        }

        visitor.replaceUnsolvedAttributes(element);
    }
@Override
    public void replaceUnsolvedElements(NamedConcreteElement element) {
        super.replaceUnsolvedElements(element);

        XsdNamedElements elem = element.getElement();
        String elemName = elem.getRawName();

        boolean isComplexOrSimpleType = elem instanceof XsdComplexType || elem instanceof XsdSimpleType;

        if (this.base instanceof UnsolvedReference && isComplexOrSimpleType && ((UnsolvedReference) this.base).getRef().equals(elemName)){
            this.base = element;
        }

        if (this.childElement instanceof UnsolvedReference &&
                elem instanceof XsdGroup && ((UnsolvedReference) this.childElement).getRef().equals(elemName)){
            this.childElement = element;
        }

        visitor.replaceUnsolvedAttributes(element);
    }
@ Override public void replaceUnsolvedElements ( NamedConcreteElement element ) { super . replaceUnsolvedElements ( element ) ; XsdNamedElements elem = element . getElement ( ) ; String elemName = elem . getRawName ( ) ; boolean isComplexOrSimpleType = elem instanceof XsdComplexType || elem instanceof XsdSimpleType ; if ( this . base instanceof UnsolvedReference && isComplexOrSimpleType && ( ( UnsolvedReference ) this . base ) . getRef ( ) . equals ( elemName ) ) { this . base = element ; } if ( this . childElement instanceof UnsolvedReference && elem instanceof XsdGroup && ( ( UnsolvedReference ) this . childElement ) . getRef ( ) . equals ( elemName ) ) { this . childElement = element ; } visitor . replaceUnsolvedAttributes ( element ) ; }
This method should always receive two elements, one to replace the {@link UnsolvedReference} created due to
the value present in the base attribute and another if it has an {@link UnsolvedReference} as a child element.
@param element A concrete element with a name that will replace the {@link UnsolvedReference} object created in the
{@link XsdExtension} constructor. The {@link UnsolvedReference} is only replaced if there
is a match between the {@link UnsolvedReference#ref} and the {@link NamedConcreteElement#name}.
This method should always receive two elements one to replace the {