Examples of DTD


Examples of javax.xml.stream.events.DTD

                            if (fStAXValidatorHandler != null) {
                                fStAXValidatorHandler.entityReference((EntityReference) fCurrentEvent);
                            }
                            break;
                        case XMLStreamConstants.DTD:
                            DTD dtd = (DTD) fCurrentEvent;
                            processEntityDeclarations(dtd.getEntities());
                            if (fStAXValidatorHandler != null) {
                                fStAXValidatorHandler.doctypeDecl(dtd);
                            }
                            break;
                    }
View Full Code Here

Examples of javax.xml.stream.events.DTD

     */
    public void add(javax.xml.stream.events.XMLEvent xMLEvent) throws javax.xml.stream.XMLStreamException {
        int type = xMLEvent.getEventType();
        switch(type){
            case XMLEvent.DTD:{
                DTD dtd = (DTD)xMLEvent ;
                if (DEBUG)System.out.println("Adding DTD = " + dtd.toString());
                fStreamWriter.writeDTD(dtd.getDocumentTypeDeclaration());
                break;
            }
            case XMLEvent.START_DOCUMENT :{
                StartDocument startDocument = (StartDocument)xMLEvent ;
                if (DEBUG)System.out.println("Adding StartDocument = " + startDocument.toString());
View Full Code Here

Examples of javax.xml.stream.events.DTD

                            if (fStAXValidatorHandler != null) {
                                fStAXValidatorHandler.entityReference((EntityReference) fCurrentEvent);
                            }
                            break;
                        case XMLStreamConstants.DTD:
                            DTD dtd = (DTD) fCurrentEvent;
                            processEntityDeclarations(dtd.getEntities());
                            if (fStAXValidatorHandler != null) {
                                fStAXValidatorHandler.doctypeDecl(dtd);
                            }
                            break;
                    }
View Full Code Here

Examples of javax.xml.stream.events.DTD

            dtdBuilder.append(" SYSTEM \"");
            dtdBuilder.append(systemId).append("\"");
        }
        dtdBuilder.append(">");

        final DTD event = eventFactory.createDTD(dtdBuilder.toString());
        try {
            this.consumeEvent(event);
        }
        catch (XMLStreamException ex) {
            throw new SAXException("Could not create DTD: " + ex.getMessage(), ex);
View Full Code Here

Examples of javax.xml.stream.events.DTD

            Assert.assertSame(((SAXTransformerFactory) TransformerFactory.newInstance()).newTransformerHandler().getClass(), transformerHandler.getClass());
        }
    }

    public void checkXmlEvent(Class<?> clazz, boolean fake) throws Exception {
        DTD dtd = invokeMethod(clazz.newInstance(), "eventDTD");
        XMLEventFactory factory = invokeMethod(clazz.newInstance(), "eventFactory");

        Assert.assertEquals(__XMLEventFactory.class.getName(), factory.getClass().getName());

        if (fake) {
            Assert.assertEquals(FakeDTD.class.getName(), dtd.getClass().getName());
        } else {
            Assert.assertSame(XMLEventFactory.newInstance().createDTD("blah").getClass(), dtd.getClass());
        }
    }
View Full Code Here

Examples of javax.xml.stream.events.DTD

    if (o == null)
      return false;
    if (this == o)
      return true;

    DTD dtd = (DTD) o;

    return
      getDocumentTypeDeclaration().equals(dtd.getDocumentTypeDeclaration()) &&
      getEntities().equals(dtd.getEntities()) &&
      getNotations().equals(dtd.getNotations()) &&
      getProcessedDTD().equals(dtd.getProcessedDTD());
  }
View Full Code Here

Examples of javax.xml.stream.events.DTD

    if (o == null)
      return false;
    if (this == o)
      return true;

    DTD dtd = (DTD) o;

    return
      getDocumentTypeDeclaration().equals(dtd.getDocumentTypeDeclaration()) &&
      getEntities().equals(dtd.getEntities()) &&
      getNotations().equals(dtd.getNotations()) &&
      getProcessedDTD().equals(dtd.getProcessedDTD());
  }
View Full Code Here

Examples of javax.xml.stream.events.DTD

    {
        if (o == this) return true;
        if (o == null) return false;
        if (!(o instanceof DTD)) return false;

        DTD other = (DTD) o;

        /* Hmmh. Comparison for this event get very
         * tricky, very fast, if one tries to do it correctly
         * (partly due to Stax2 incompleteness, but not just
         * because of that)... let's actually try to minimize
         * work here
         */
        return stringsWithNullsEqual(getDocumentTypeDeclaration(),
                                     other.getDocumentTypeDeclaration());
    }
View Full Code Here

Examples of mf.javax.xml.stream.events.DTD

                            if (fStAXValidatorHandler != null) {
                                fStAXValidatorHandler.entityReference((EntityReference) fCurrentEvent);
                            }
                            break;
                        case XMLStreamConstants.DTD:
                            DTD dtd = (DTD) fCurrentEvent;
                            processEntityDeclarations(dtd.getEntities());
                            if (fStAXValidatorHandler != null) {
                                fStAXValidatorHandler.doctypeDecl(dtd);
                            }
                            break;
                    }
View Full Code Here

Examples of nu.validator.saxtree.DTD

    /**
     * @see nu.validator.htmlparser.impl.TreeBuilder#appendDoctypeToDocument(java.lang.String, java.lang.String, java.lang.String)
     */
    @Override
    protected void appendDoctypeToDocument(String name, String publicIdentifier, String systemIdentifier) {
         DTD dtd = new DTD(tokenizer, name, publicIdentifier, systemIdentifier);
         dtd.setEndLocator(tokenizer);
         document.appendChild(dtd);
    }
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.