Examples of DTD


Examples of com.wutka.dtd.DTD

    // clear at fisrt
    _tagList.clear();
    //    root = null;
    try {
      DTDParser parser = new DTDParser(in);
      DTD dtd = parser.parse();
      Object[] obj = dtd.getItems();
      for (int i = 0; i < obj.length; i++) {
        if (obj[i] instanceof DTDElement) {
          DTDElement element = (DTDElement) obj[i];
          String name = element.getName();
          DTDItem item = element.getContent();
View Full Code Here

Examples of com.wutka.dtd.DTD

//              in = url.openStream();
//            }
            if(in!=null){
              Reader reader = new InputStreamReader(in);
              DTDParser parser = new DTDParser(reader);
              DTD dtd = parser.parse();
              Object[] obj = dtd.getItems();
              for(int i=0;i<obj.length;i++){
                if(obj[i] instanceof DTDElement){
                  DTDElement element = (DTDElement)obj[i];
                  String name = element.getName();
                  comboDocumentRoot.add(name);
View Full Code Here

Examples of com.wutka.dtd.DTD

  }
 
 
  private DocumentDefinition initDefinition(URL resource) throws Exception{

    DTD dtd = new DTDParser(resource).parse();
   
    Element rootElement = fromWutka(dtd.rootElement);
   
    DocumentDefinition definition = new DocumentDefinition(resource, rootElement);
   
View Full Code Here

Examples of com.wutka.dtd.DTD

     * @param stream DTD data stream.
     */
  public static void addDTD(ProfileSet profileSet, InputStream stream) {
    try {
      com.wutka.dtd.DTDParser parser = new com.wutka.dtd.DTDParser(new InputStreamReader(stream));
      DTD dtd = parser.parse();
      dtds.put(profileSet, dtd);
    } catch(Exception excep) {
            IllegalStateException state = new IllegalStateException("Error parsing dtd for [" + profileSet.getBaseProfile() + "].");
            state.initCause(excep);
            throw state;
View Full Code Here

Examples of com.wutka.dtd.DTD

   * Get the DTD for the profile.
   * @param profileSet Profile set.
   * @return The DTD for the deviceContext device.
   */
  private static DTD getDTD(ProfileSet profileSet) {
    DTD dtd;
   
    if(profileSet == null) {
      throw new IllegalArgumentException("null 'profileSet' arg in method call.");
    }

View Full Code Here

Examples of javax.swing.text.html.parser.DTD

    private static final String JAVA7_STRING = "http://docs.oracle.com/javase/7/docs/api/java/lang/String.html";
    private static final String JAVA8_STRING = "http://docs.oracle.com/javase/8/docs/api/java/lang/String.html";

    @Test
    public void testGetMethods() throws Exception {
        final DTD dtd = DTD.getDTD("html.dtd");
        final String javaDocPath = String.class.getName().replaceAll("\\.", "/") + ".html";
        final JavadocParser htmlParser = new JavadocParser(dtd, javaDocPath);

        htmlParser.parse(new InputStreamReader(new URL(JAVA6_STRING).openStream(), "UTF-8"));
        assertNull("Java6 getErrorMessage", htmlParser.getErrorMessage());
View Full Code Here

Examples of javax.swing.text.html.parser.DTD

                    log.debug("JavaDoc not found on classpath for " + aClass.getName());
                    break;
                }
                // transform the HTML to get method summary as text
                // dummy DTD
                final DTD dtd = DTD.getDTD("html.dtd");
                final JavadocParser htmlParser = new JavadocParser(dtd, javaDocPath);
                htmlParser.parse(new InputStreamReader(inputStream, "UTF-8"));

                // look for parse errors
                final String parseError = htmlParser.getErrorMessage();
View Full Code Here

Examples of javax.swing.text.html.parser.DTD

class HTMLParser {

    private final ParserImpl parser;
 
    HTMLParser() throws IOException {
        DTD dtd = DTD.getDTD("reader");
        dtd.read(new DataInputStream(dtd.getClass().getResourceAsStream("html32.bdtd")));//transitional401.bdtd")));
        parser = new ParserImpl(dtd);
    }
View Full Code Here

Examples of javax.swing.text.html.parser.DTD

        AppContext appContext = AppContext.getAppContext();

        assertTrue(DTD.getDTD(DTD_KEY).getName().equals(DTD_KEY), "DTD.getDTD() mixed AppContexts");

        // Spoil hash value
        DTD invalidDtd = DTD.getDTD("invalid DTD");

        DTD.putDTDHash(DTD_KEY, invalidDtd);

        assertTrue(DTD.getDTD(DTD_KEY) == invalidDtd, "Something wrong with DTD.getDTD()");
View Full Code Here

Examples of javax.xml.stream.events.DTD

        er.setProperty(WstxInputProperties.P_BASE_URL, new URL(URI));
        assertTrue(er.nextEvent().isStartDocument());
        XMLEvent evt = er.nextEvent(); // DTD
        assertTokenType(DTD, evt.getEventType());

        DTD dtd = (DTD) evt;
        List<?> nots = dtd.getNotations();
        assertEquals(1, nots.size());
        NotationDeclaration2 notDecl = (NotationDeclaration2) nots.get(0);

        assertEquals(URI, notDecl.getBaseURI());
    }
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.