Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6620632

sjsxp issue 48: DTD event is missing entity and notation information

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 6
    • xml
    • 1.4
    • generic
    • generic
    • Verified

        sjsxp issue 48:

        DTDEvent instances constructed via event reader are missing the notation and
        entity declaration information. Fortunately both are available via stream
        reader; so modifying XMLEntityManager's DTDEvent construction with code similar
        to this:

                            DTDEvent dtd = new DTDEvent(streamReader.getText());
                            List ents = (List)
        streamReader.getProperty(PropertyManager.STAX_ENTITIES);
                            if (ents != null) {
                                dtd.setEntities(ents);
                            }
                            List notations = (List)
        streamReader.getProperty(PropertyManager.STAX_NOTATIONS);
                            if (notations != null) {
                                dtd.setNotations(notations);
                            }
                            event = dtd;
                        }

        seems to resolve the problem (StaxTest, TestEventReader#testValidDtdEvent passes
        with the fix)

              joehw Joe Wang
              joehw Joe Wang
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: