Examples of XSNotationDeclaration


Examples of org.apache.xerces.impl.xs.psvi.XSNotationDeclaration

                printElement("psv:memberTypeDefinitionAnonymous",String.valueOf(memtype.getAnonymous()));
                printElement("psv:memberTypeDefinitionName",memtype.getName());
                printElement("psv:memberTypeDefinitionNamespace",memtype.getNamespace());
            }

            XSNotationDeclaration notation = elemPSVI.getNotation();
            if (notation != null) {
                printElement("psv:notationSystem",notation.getSystemId());
                printElement("psv:notationPublic",notation.getPublicId());
            }

            //revisit
            StringList errorCode = elemPSVI.getErrorCodes();
            if (errorCode != null) {
View Full Code Here

Examples of org.apache.xerces.xs.XSNotationDeclaration

     */
    public void testNoAnnotation() {
        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSNotationAnnotationsTest01.xsd"));

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation1", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNull("TEST1_NO_ANNOTATION", annotation);

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST1_NO_ANNOTATIONS", 0, annotations.getLength());

    }
View Full Code Here

Examples of org.apache.xerces.xs.XSNotationDeclaration

                        Boolean.TRUE);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSNotationAnnotationsTest01.xsd"));

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation2", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNotNull("TEST2_ANNOTATION", annotation);

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST2_ANNOTATIONS", 1, annotations.getLength());
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSNotationDeclaration

                        Boolean.FALSE);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSNotationAnnotationsTest01.xsd"));

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation2", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNull("TEST3_NO_ANNOTATION", annotation);

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST3_NO_ANNOTATIONS", 0, annotations.getLength());

    }
View Full Code Here

Examples of org.apache.xerces.xs.XSNotationDeclaration

    private void annotationsTest4(XSModel model) {
        String expected = "<annotation id=\"ANNOT1\" xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"XSNotationAnnotationsTest\" xmlns:sn=\"SyntheticAnnotation\" > "
                + "<appinfo>APPINFO1</appinfo>" + "</annotation>";

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation3", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNotNull("TEST4_ANNOTATION", annotation);
        assertEquals("TEST4_ANNOTATION_EQ", trim(expected), trim(annotation
                .getAnnotationString()));

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST4_ANNOTATIONS", 1, annotations.getLength());
        assertEquals(
                "TEST4_ANNOTATIONS_EQ",
                trim(expected),
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));
View Full Code Here

Examples of org.apache.xerces.xs.XSNotationDeclaration

    private void annotationsTest5(XSModel model) {
        String expected = "<annotation sn:att=\"synth\" id=\"ANNOT2\" xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"XSNotationAnnotationsTest\" xmlns:sn=\"SyntheticAnnotation\" > "
                + "<documentation>DOC1</documentation>" + "</annotation>";

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation4", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNotNull("TEST5_ANNOTATION", annotation);
        assertEquals("TEST5_ANNOTATION_EQ", trim(expected), trim(annotation
                .getAnnotationString()));

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST5_ANNOTATIONS", 1, annotations.getLength());
        assertEquals(
                "TEST5_ANNOTATIONS_EQ",
                trim(expected),
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.