Since Axiom was designed as an XML/SOAP object model for Web Services,
and entities are not used in Web Services, Axiom doesn't support
entity references. More precisely, as you noticed, Axiom will replace
entity references during parsing. I think it would be fairly easy to
add basic support for entity references in the object model. However,
parsing the entities and exposing their content through the API is
another story.

If you want to see this feature in Axiom, then your contribution will
be required. One of the first things to do would be to check how the
StAX API (which is used by Axiom to do the parsing) allows to get
access to that information.

Andreas

On Mon, May 25, 2009 at 10:32, Rossen Kovachev <[email protected]> wrote:
> Hi everybody,
>
> I have a question about the handling of entities by AXIOM. Is it possible to
> avoid the extending of this entities in the result document?
>
> The scenario is as follows:
> - a master xml file, that includes another xml "parts" by a set of internal
> entities.
>
>
> The desired behavior:
> - the parser should be able to parse the content of the referenced parts
> - the output document have to content furthermore the entities and not to
> replace them in the master file
>
> Default behavior of AXIOM:
> - the referenced document parts are parsed (OK)
> - AXIOM replaces the entities (SIC!)
>
>
> The analog option in DOM is to be set by the configuration of the parser
> object:
>
> // Obtaining a DOMConfiguration object
> DOMConfiguration config = parser.getDomConfig();
>
> // Keep EntityReference nodes in the document
> config.setParameter("entities", Boolean.TRUE);
>
> // Parsng an XML document
> Document document = parser.parseURI(inFile);
>
>
> Is it possible to do the same with AXIOM?
>
>
> Thanks for any suggestions!
>
>

Reply via email to