Hello,
Node type 5 is an "entity reference node". Saxon can't handle a DOM
containing entity reference nodes, all the entities must have been fully
expanded.=0D
The entity reference nodes are there because you have set:
> documentBuilderFactory.setAttribute(
> "http://apache.org/xml/features/dom/create-entity-ref-nodes",
> Boolean.TRUE);
Do you really need them for your processing?=0D
--> I do need the entity references in my processing and want to make it in=
one shot. What I mean by this is that I can't parse my document once, do=
my processing with SAXON then serialize it again with the modifications=
and re-parse this serialized file (with entities references) to do another=
processing.
I have looked at the given stack trace and modified SAXON code=
('makeWrapper' method in the net.sf.saxon.dom.NodeWrapper class) by adding=
the following lines :
case Node.ENTITY_REFERENCE_NODE:
wrapper =3D new NodeWrapper(node, parent, index);
wrapper.nodeKind =3D Type.COMMENT;
break;
It seems to work on my example but I was wondering if my modifications were=
valid or not and if any problem can occur whit this modification.
Thanks in advance,
J=E9r=F4me.
=0D
This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.
|