Examples of XSD


Examples of org.gatein.pc.portlet.impl.deployment.xml.XSD

      }

      // Perform schema validation if required
      if (schemaValidation)
      {
         XSD xsd = version == 1 ? XSD.PORTLET_1_0 : XSD.PORTLET_2_0;
         try
         {
            xsd.validate(new StreamSource(new ByteArrayInputStream(bytes)));
         }
         catch (Exception e)
         {
            throw new DeploymentException("The portlet.xml file is not valid XML", e);
         }
View Full Code Here

Examples of org.gatein.pc.portlet.impl.deployment.xml.XSD

      }

      // Perform schema validation if required
      if (schemaValidation)
      {
         XSD xsd = version == 1 ? XSD.PORTLET_1_0 : XSD.PORTLET_2_0;
         xsd.validate(new StreamSource(new ByteArrayInputStream(bytes)));
      }

      //
      assert Element.portlet_app == nav.getName();
View Full Code Here

Examples of org.geotools.xml.XSD

            root.setAttribute("xmlns:" + prefix, uri );
        }
       
        //process the schemaLocation, replace any schema locations that we know about
        if (root.hasAttribute("xsi:schemaLocation")) {
            XSD xsd = config.getXSD();
            List<XSD> deps = xsd.getAllDependencies();
            deps.add(xsd);
           
            String[] locations = root.getAttribute("xsi:schemaLocation").split(" +");
            for (int i = 0; i < locations.length; i += 2) {
                String uri = locations[i];
View Full Code Here

Examples of org.geotools.xml.XSD

        NamespaceSupport namespaces = new NamespaceSupport();
        HashMap mappings = new HashMap();

        try {
            for (Iterator d = configuration.getXSD().getDependencies().iterator(); d.hasNext();) {
                XSD xsd = (XSD) d.next();
                XSDSchema schema = xsd.getSchema();

                mappings.putAll(schema.getQNamePrefixToNamespaceMap());
            }

            mappings.putAll(configuration.getXSD().getSchema().getQNamePrefixToNamespaceMap());
View Full Code Here

Examples of org.geotools.xml.XSD

            public XSDSchema locateSchema(XSDSchema schema, String namespaceURI,
                String rawSchemaLocationURI, String resolvedSchemaLocationURI) {
               
                for ( Iterator x = xsds.iterator(); x.hasNext(); ) {
                    XSD xsd = (XSD) x.next();
                    if ( xsd == null ) {
                        continue;
                    }
                    if ( xsd.getNamespaceURI().equals( namespaceURI ) ) {
                        try {
                            return xsd.getSchema();
                        }
                        catch (IOException e) {
                            getLog().warn("Error occured locating schema: " + namespaceURI, e);
                        }
                    }
View Full Code Here

Examples of org.geotools.xml.XSD

            final QName featureName = new QName(typeName.getNamespaceURI(), typeName.getLocalPart());

            String namespaceURI = featureName.getNamespaceURI();
            String uri = schemaLocation.toExternalForm();

            XSD xsd = new org.geotools.gml2.ApplicationSchemaXSD(namespaceURI, uri);
            Configuration configuration = new Configuration(xsd) {
                {
                    addDependency(new XSConfiguration());
                    addDependency(gmlConfiguration); // use our GML configuration
                }
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.