Skip to content

Support disabling General Entity Reference replacement in attribute values #65

@otcdlink-simpleuser

Description

@otcdlink-simpleuser

With aalto-xml 1.1.0 disabling Entity Reference replacement causes an exception to be thrown in case of a non-standard Entity.

Using the test case of #64 with this line:

xmlInputFactory.setProperty( XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false ) ;

We get the following exception:

com.fasterxml.aalto.WFCException: General entity reference (&en;) encountered in entity expanding mode: operation not (yet) implemented
 at [row,col {unknown-source}]: [1,18]

	at com.fasterxml.aalto.in.XmlScanner.reportInputProblem(XmlScanner.java:1333)
	at com.fasterxml.aalto.in.ReaderScanner.handleEntityInText(ReaderScanner.java:1256)
	at com.fasterxml.aalto.in.ReaderScanner.collectValue(ReaderScanner.java:899)
	at com.fasterxml.aalto.in.ReaderScanner.handleStartElement(ReaderScanner.java:794)
	at com.fasterxml.aalto.in.ReaderScanner.nextFromProlog(ReaderScanner.java:236)
	at com.fasterxml.aalto.stax.StreamReaderImpl.next(StreamReaderImpl.java:790)
	at com.otcdlink.chiron.wire.StaxPlayground.entityReplacement2(StaxPlayground.java:80)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions