All the requirements specified in {@link org.apache.axiom.ext.stax} apply tothis extension interface. In particular, a consumer MUST use {@link javax.xml.stream.XMLStreamReader#getProperty(String)} with the propertyname defined by {@link #PROPERTY} to get a reference to this extension interface.
If the {@link javax.xml.stream.XMLStreamReader} wishes to expose base64 encoded content usingthis extension interface, it MUST do so using a single {@link javax.xml.stream.XMLStreamConstants#CHARACTERS} event. To maintain compatibility withconsumers that are unaware of the extension, the implementation SHOULD make sure that {@link javax.xml.stream.XMLStreamReader#getText()}, {@link javax.xml.stream.XMLStreamReader#getTextStart()}, {@link javax.xml.stream.XMLStreamReader#getTextLength()}, {@link javax.xml.stream.XMLStreamReader#getTextCharacters()}, {@link javax.xml.stream.XMLStreamReader#getTextCharacters(int,char[],int,int)} and{@link javax.xml.stream.XMLStreamReader#getElementText()} behave as expected for this type ofevent, i.e. return the base64 representation of the binary content.
The extension described by this interface will typically be implemented by XMLStreamReader instances provided by databinding frameworks or XMLStreamReader proxies that enrich a stream of StAX events with binary data existing outside of the XML document (e.g. an XOP/MTOM decoder).
|
|