Package org.apache.ws.jaxme.xs.util

Examples of org.apache.ws.jaxme.xs.util.DTDParser


      reset();
      log.finest(mName, "->", pSource.getSystemId());
      SGFactory factory = getSGFactory();
      XSSchema schema;
        if (Boolean.valueOf(getGenerator().getProperty("jaxme.dtd.input")).booleanValue()) {
            DTDParser parser = new DTDParser();
            String targetNamespace = getGenerator().getProperty("jaxme.dtd.targetNamespace");
            if (targetNamespace != null  &&  !"".equals(targetNamespace)) {
              parser.setTargetNamespace(new XsAnyURI(targetNamespace));
            }
            schema = parser.parse(pSource);
        } else {
          XSParser parser = factory.newXSParser();
          log.finest(mName, "Parser = " + parser + ", validating = " + getGenerator().isValidating());
          parser.setValidating(getGenerator().isValidating());
          schema = parser.parse(pSource);
        }
      log.finest(mName, "Schema = " + schema);
      SchemaSG result = factory.getSchemaSG(schema);
      log.finest(mName, "<-", result);
      return result;
View Full Code Here


  public void testXMLSchemaDtd() throws Exception {
    String path = System.getProperty("path.xmlSchema.dtd", "examples/xs/XMLSchema.dtd");
        File f = new File(path);
        InputSource isource = new InputSource(new FileReader(f));
        isource.setSystemId(f.toURL().toString());
        new DTDParser().parse(isource);
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.xs.util.DTDParser

Copyright © 2018 www.massapicom. 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.