Examples of XSElement


Examples of org.apache.ws.jaxme.xs.XSElement

      XSSchema schema = parser.parse(isource);

      XSElement[] elements = schema.getElements();
      assertEquals( 1, elements.length );

      XSElement libraryElement = elements[0];
      XSIdentityConstraint[] ics = libraryElement.getIdentityConstraints();

      assertEquals( 1, ics.length );

      XSIdentityConstraint ic = ics[0];
      assertEquals( "book-key", ic.getName() );

      XSElementOrAttrRef[][] icMatchCriteria = ic.getMatchCriteria();

      assertEquals( 2, icMatchCriteria.length );
      assertEquals( 1, icMatchCriteria[0].length );
      assertEquals( 1, icMatchCriteria[1].length );

      assertEquals(
        "id",
        icMatchCriteria[0][0].getAttribute().getName().getLocalName()
      );
      assertEquals(
        "book",
        icMatchCriteria[1][0].getElement().getName().getLocalName()
      );

      XSKeyRef[] rfs = libraryElement.getKeyRefs();
      assertEquals( 1, rfs.length );

      XSKeyRef rf = rfs[0];
      assertEquals( "book-key-ref", rf.getName() );
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.