Package org.exolab.castor.util

Examples of org.exolab.castor.util.DTDResolver$DTDInfo


                }
                return;
               
            case DTD:
                {
                    DTDInfo info = sr.getDTDInfo();
                    if (info == null) {
                        // Hmmmh. It is legal for this to happen, for
                        // non-DTD-aware readers. But what is the right
                        // thing to do here?
                        throwOutputError("Current state DOCTYPE, but not DTDInfo Object returned -- reader doesn't support DTDs?");
View Full Code Here


                    char c = (text.length() == 0) ? ' ': text.charAt(text.length()-1);
                    if (c != '\r' && c != '\n') {
                        System.out.println();
                    }
                } else if (type == DTD) {
                    DTDInfo info = sr.getDTDInfo();
                    System.out.println(" DTD (root "
                                       +getNullOrStr(info.getDTDRootName())
                                       +", sysid "+getNullOrStr(info.getDTDSystemId())
                                       +", pubid "+getNullOrStr(info.getDTDPublicId())
                                       +");");
                    List<?> entities = (List<?>) sr.getProperty("javax.xml.stream.entities");
                    List<?> notations = (List<?>) sr.getProperty("javax.xml.stream.notations");
                    int entCount = (entities == null) ? -1 : entities.size();
                    int notCount = (notations == null) ? -1 : notations.size();
View Full Code Here

            return mStreamReader.getLocalName();
        case XMLStreamConstants.PROCESSING_INSTRUCTION:
            return mStreamReader.getPITarget();
        case XMLStreamConstants.DTD:
            {
                DTDInfo dtd = mStreamReader.getDTDInfo();
                return (dtd == null) ? null : dtd.getDTDRootName();
            }
        }

        return null;
    }
View Full Code Here

            ln = mStreamReader.getPITarget();
            uri = null;
            break;
        case XMLStreamConstants.DTD:
            {
                DTDInfo dtd = mStreamReader.getDTDInfo();
                ln = (dtd == null) ? null : dtd.getDTDRootName();
            }
            uri = null;
            break;
        default:
            return false;
View Full Code Here

                String.format("Unexpected XML parse event %s.", MXParser.TYPES[eventType - 1]));
    }

    private void dtd() throws XMLStreamException
    {
        DTDInfo dtdInfo = reader.getDTDInfo();

        tokens.add(new DTDToken(dtdInfo.getDTDRootName(), dtdInfo.getDTDPublicId(), dtdInfo.getDTDSystemId(),
                                getLocation()));
    }
View Full Code Here

                    char c = (text.length() == 0) ? ' ': text.charAt(text.length()-1);
                    if (c != '\r' && c != '\n') {
                        System.out.println();
                    }
                } else if (type == DTD) {
                    DTDInfo info = sr.getDTDInfo();
                    System.out.println(" DTD (root "
                                       +getNullOrStr(info.getDTDRootName())
                                       +", sysid "+getNullOrStr(info.getDTDSystemId())
                                       +", pubid "+getNullOrStr(info.getDTDPublicId())
                                       +");");
                    List entities = (List) sr.getProperty("javax.xml.stream.entities");
                    List notations = (List) sr.getProperty("javax.xml.stream.notations");
                    int entCount = (entities == null) ? -1 : entities.size();
                    int notCount = (notations == null) ? -1 : notations.size();
View Full Code Here

                }
                return;
               
            case DTD:
                {
                    DTDInfo info = sr.getDTDInfo();
                    if (info == null) {
                        // Hmmmh. It is legal for this to happen, for
                        // non-DTD-aware readers. But what is the right
                        // thing to do here?
                        throwOutputError("Current state DOCTYPE, but not DTDInfo Object returned -- reader doesn't support DTDs?");
View Full Code Here

                String sysId = mScanner.getDTDSystemId();
                String pubId = mScanner.getDTDPublicId();
                mLexicalHandler.startDTD(rootName, pubId, sysId);
                // Ok, let's get rest (if any) read:
                try {
                    DTDInfo dtdInfo = mScanner.getDTDInfo();
                } catch (WrappedSaxException wse) {
                    throw wse.getSaxException();
                }
                mLexicalHandler.endDTD();
            }
View Full Code Here

            return new WComment(loc, r.getText());
        case DTD:
            // Not sure if we really need this defensive coding but...
            if (r instanceof XMLStreamReader2) {
                XMLStreamReader2 sr2 = (XMLStreamReader2) r;
                DTDInfo dtd = sr2.getDTDInfo();
                return new WDTD(loc,
                                dtd.getDTDRootName(),
                                dtd.getDTDSystemId(), dtd.getDTDPublicId(),
                                dtd.getDTDInternalSubset(),
                                (DTDSubset) dtd.getProcessedDTD());
            }
            /* No way to get all information... the real big problem is
             * that of how to access root name: it's obligatory for
             * DOCTYPE construct. :-/
             */
 
View Full Code Here

                String.format("Unexpected XML parse event %s.", EVENT_NAMES[eventType]));
    }

    private void dtd() throws XMLStreamException
    {
        DTDInfo dtdInfo = reader.getDTDInfo();

        tokenAccumulator.add(new DTDToken(dtdInfo.getDTDRootName(), dtdInfo.getDTDPublicId(), dtdInfo.getDTDSystemId(),
                                          getLocation()));
    }
View Full Code Here

TOP

Related Classes of org.exolab.castor.util.DTDResolver$DTDInfo

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.