예제 #1
0
 /// <summary>
 /// Create a new prefs XML document.
 /// </summary>
 private static Document CreatePrefsDoc(String qname)
 {
     try
     {
         DOMImplementation di = DocumentBuilderFactory.newInstance().newDocumentBuilder().DOMImplementation;
         DocumentType      dt = di.createDocumentType(qname, null, PREFS_DTD_URI);
         return(di.createDocument(null, qname, dt));
     }
     catch (ParserConfigurationException e)
     {
         throw new AssertionError(e);
     }
 }
예제 #2
0
        /**
         * Return the first implementation that has the desired
         * features, or <code>null</code> if none is found.
         *
         * @param features
         *            A string that specifies which features are required. This is
         *            a space separated list in which each feature is specified by
         *            its name optionally followed by a space and a version number.
         *            This is something like: "XML 1.0 Traversal +Events 2.0"
         * @return An implementation that has the desired features,
         *         or <code>null</code> if none found.
         */
        public DOMImplementation getDOMImplementation(String features)
        {
            int size = sources.size();

            //String name = null; Basties Note: unused...
            for (int i = 0; i < size; i++)
            {
                DOMImplementationSource source =
                    (DOMImplementationSource)sources.elementAt(i);
                DOMImplementation impl = source.getDOMImplementation(features);
                if (impl != null)
                {
                    return(impl);
                }
            }
            return(null);
        }
예제 #3
0
        /**
         * Return a list of implementations that support the
         * desired features.
         *
         * @param features
         *            A string that specifies which features are required. This is
         *            a space separated list in which each feature is specified by
         *            its name optionally followed by a space and a version number.
         *            This is something like: "XML 1.0 Traversal +Events 2.0"
         * @return A list of DOMImplementations that support the desired features.
         */
        public DOMImplementationList getDOMImplementationList(String features)
        {
            java.util.Vector <Object> implementations = new java.util.Vector <Object>();
            int size = sources.size();

            for (int i = 0; i < size; i++)
            {
                DOMImplementationSource source =
                    (DOMImplementationSource)sources.elementAt(i);
                DOMImplementationList impls =
                    source.getDOMImplementationList(features);
                for (int j = 0; j < impls.getLength(); j++)
                {
                    DOMImplementation impl = impls.item(j);
                    implementations.addElement(impl);
                }
            }
            return(new IAC_DOMImplementationList(implementations));
        }
예제 #4
0
 static MediaQueryListTests()
 {
     DOM      = new DOMImplementation();
     document = DOM.createDocument("CssUI", "cssui");
 }
 DOMNodeList(DOMImplementation impl, NodeList nodeList)
 {
     super(impl, nodeList);
 }
예제 #6
0
 static CssParserTests()
 {// Many of the parsers functions will require a DOM and document
     DOM      = new DOMImplementation();
     document = DOM.createDocument("CssUI", "cssui");
 }
 public SimpleHandler(DOMImplementation impl)
 {
     _impl = impl;
 }