Examples of XsESchema


Examples of org.apache.ws.jaxme.xs.xml.XsESchema

    xsSAXParser.startDocument();
  }

  public void endDocument() throws SAXException {
    xsSAXParser.endDocument();
    XsESchema syntaxSchema = (XsESchema) xsSAXParser.getBean();
    parser.removeSyntaxSchema();
    XSContext data = parser.getData();
    data.setCurrentContentHandler(null);

    try {
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

      XsNCName myName = pBaseGroup.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid attribute group: Neither of its 'name' or 'ref' attributes are set.",
                                     pBaseGroup.getLocator());
      } else {
        XsESchema schema = pBaseGroup.getXsESchema();
        qName = new XsQName(schema.getTargetNamespace(), myName.toString(), schema.getTargetNamespacePrefix());
      }
    }
    name = qName;
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

      XsNCName myName = pBaseElement.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid element: Must have either of its 'ref' or 'name' attributes set.",
                                     getLocator());
      }
      XsESchema schema = pBaseElement.getXsESchema();

      XsAnyURI namespace;
      String namespacePrefix;
      boolean qualified = pBaseElement.isGlobal();
      if (!qualified) {
        XsFormChoice form = pBaseElement.getForm();
        if (form == null) {
          form = schema.getElementFormDefault();
        }
        qualified = XsFormChoice.QUALIFIED.equals(form);
      }
      if (qualified) {
        namespace = schema.getTargetNamespace();
        namespacePrefix = schema.getTargetNamespacePrefix();
      } else {
        namespace = null;
        namespacePrefix = null;
      }
      qName = new XsQName(namespace, myName.toString(), namespacePrefix);
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

  protected XsESchema parseSyntax(Node pNode) throws SAXException {
    XSContext data = getData();
    try {
      XsObjectFactory factory = data.getXsObjectFactory();
      XsESchema mySchema = factory.newXsESchema();
      XsSAXParser xsSAXParser = factory.newXsSAXParser(mySchema);
      addSyntaxSchema(mySchema);
      try {
        data.setCurrentContentHandler(xsSAXParser);
        DOMSerializer ds = new DOMSerializer();
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

  protected XsESchema parseSyntax(InputSource pSource)
      throws SAXException, IOException, ParserConfigurationException {
    XSContext data = getData();
    try {
      XsObjectFactory factory = data.getXsObjectFactory();
      XsESchema mySchema = factory.newXsESchema();
      XsSAXParser xsSAXParser = factory.newXsSAXParser(mySchema);
      addSyntaxSchema(mySchema);
      try {
        data.setCurrentContentHandler(xsSAXParser);
        XMLReader xr = factory.newXMLReader(isValidating());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

                                   pInclude.getLocator());
    }
    Locator locator = pInclude.getLocator();
    InputSource schemaSource = getInputSource(locator == null ? null : locator.getSystemId(),
                                              schemaLocation.toString());
    XsESchema includedSchema = parseSyntax(schemaSource);
    XsAnyURI incNamespace = includedSchema.getTargetNamespace();
    if (incNamespace == null) {
      includedSchema.setTargetNamespace(includedSchema.getTargetNamespace());
    } else {
      XsAnyURI myNamespace = includedSchema.getTargetNamespace();
      if (!incNamespace.equals(myNamespace)) {
        throw new LocSAXException("Invalid include: The included schemas target namespace " +
                                     incNamespace + " and the including schemas target namespace " +
                                     myNamespace + " do not match.",
                                     pInclude.getLocator());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

    if (importedSchemas == null) {
      importedSchemas = new HashSet();
    }
    importedSchemas.add(pSchemaLocation);
    InputSource schemaSource = getInputSource(pLocator == null ? null : pLocator.getSystemId(), pSchemaLocation);
    XsESchema importedSchema = parseSyntax(schemaSource);
    importSchema(pImportingSchema, pNamespace, importedSchema, pLocator);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

  }

  protected void importSchema(XsESchema pImportingSchema, String pNamespace, Node pNode)
      throws SAXException, IOException, ParserConfigurationException {
    checkValidImportSchema(pImportingSchema, pNamespace, null);
    XsESchema importedSchema = parseSyntax(pNode);
    importSchema(pImportingSchema, pNamespace, importedSchema, null);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

    // may be used to replace the substitution groups head, if required.
    for (Iterator iter = substitutionGroups.values().iterator();  iter.hasNext()) {
      SubstitutionGroup group = (SubstitutionGroup) iter.next();
      XSElementImpl head = (XSElementImpl) group.getHead();
      XsObject object = head.getXsObject();
      XsESchema syntaxSchema = object.getXsESchema();

      // Find a name for the group
      String namespace = syntaxSchema.getTargetNamespace().toString();
      String localName = head.getName().getLocalName() + "Group";
      XsQName suggestion = new XsQName(namespace, localName);
      if (pSchema.getGroup(suggestion) != null) {
        for (int i = 0;  ;  i++) {
          suggestion = new XsQName(namespace, localName + i);
View Full Code Here

Examples of org.apache.ws.jaxme.xs.xml.XsESchema

  protected XsESchema parseSyntax(Node pNode) throws SAXException {
    XSContext data = getData();
    try {
      XsObjectFactory factory = data.getXsObjectFactory();
      XsESchema mySchema = factory.newXsESchema();
      XsSAXParser xsSAXParser = factory.newXsSAXParser(mySchema);
      addSyntaxSchema(mySchema);
      try {
        data.setCurrentContentHandler(xsSAXParser);
        DOMSerializer ds = new DOMSerializer();
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.