Hello David,

"Crain, David B. \(LNG-DAY\)" <[EMAIL PROTECTED]> wrote on 
05/08/2006 01:20:52 PM:
 
> Michael, 
> 
> Thanks for the quick reply. I do understand that if validation is off,
> that an undefined entity should not impact the well-formedness rule.
> However, if you are setting the "create-entity-ref-nodes" to false
> (which is asking the parser to convert an entity to its definition,
> defined in the DTD), should it be blanked out or omitted (or, as in the
> older version, remove test)?? In my opinion, the entity should be
> preserved or an exception thrown because the method that converts the
> entities should not make a judgment call.

Changing the behaviour of "create-entity-ref-nodes" in an incompatible way 
(such as throwing exceptions where it didn't before) might break existing 
applications. Though this may not be what you want, the feature does what 
it says it does. It will not create any EntityReference nodes when set to 
false. When an EntityReference represents a reference to an unknown 
entity, it has no children, so setting "create-entity-ref-nodes" to false 
eliminates it. DOM Level 3 has a similar feature [1] that will preserve 
unexpanded entity references, which I believe is what you want. Xerces 
uses "create-entity-ref-nodes" internally to implement this feature so 
it's probably broken. I'll see if I can fix the DOM Level 3 feature.

> I am thinking the offending class is:
> ./org/apache/xml/serialize/BaseMarkupSerializer.java
> 
> This was changed between versions 2.2.1, 2.6.0 and 2.8.0. I am not 100%
> sure this is the offending class, because I am not sure how the
> offending undefined entity is being seen by the parser. I am guessing
> that there would be no difference between 2.6.0 and 2.8.0, but I would
> not bank on that. 
> 
> What I would find helpful is to identify the class/method so that I
> could review the code and an appropriate code change. 
> 
> Please let me know if there are any questions. 
> 
> Dave 
> 
> David B. Crain
> Consultant Software Engineer
> Editorial & Conversion Systems
> Lexis-Nexis
> Phone: 937-865-6800 ext. 56303

Thanks.

[1] 
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to