[ 
https://issues.apache.org/jira/browse/XERCESJ-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140322#comment-18140322
 ] 

Elliotte Rusty Harold commented on XERCESJ-38:
----------------------------------------------

   Issue: XMLDTDValidator normalized attribute values and adjusted entity 
offsets/      XERCESJ-339                             
     lengths in XMLAttributes; the reporter noted those offsets/lengths are 
only                                                  
     meaningful for the non-normalized value.                                   
          Context                                 
                                                                                
          99,183 tokens                           
     It was already fixed structurally. Commit e95521568 (2001-09-17, released 
in 2.0.    50% used                                
     0 beta3 — see docs/releases.xml:2940) removed the entity offset/length API 
from      $0.00 spent                             
     XMLAttributes entirely. In the current code:                               
                                                  
                                                                                
          LSP                                     
     - XMLAttributes has no 
getEntityCount/getEntityOffset/getEntityLength/setEntity*     LSPs are disabled 
                      
       methods.                                                                 
                                                  
     - XMLAttributesImpl has no entity state or handling.                       
                                                  
     - The normalized and non-normalized values are now kept separately (       
                                                  
       getNonNormalizedValue/setNonNormalizedValue), and XMLDTDValidator.       
                                                  
       getExternalEntityRefInAttrValue() reads the non-normalized value (       
                                                  
       XMLDTDValidator.java:1251,1347).                                         
                                                  
                                                                                
                                                  
     So the wrong-offset behavior described in the issue can no longer occur.   
                                                  
                                                                                
                                                  
     Only stale remnants remain (non-functional):                               
                                                  
                                                                                
                                                  
     - Dead commented-out blocks marked BUG #3512 in XMLDTDValidator.           
                                                  
       normalizeAttrValue() at XMLDTDValidator.java:1564 and :1599, referencing 
                                                  
       methods that no longer exist.                                            
                                                  
     - Stale Javadoc claiming removeAllAttributes() also removes "entities 
associated                                             
       to the attributes": XMLAttributes.java:74 and 
XMLAttributesImpl.java:306.   

> Attribute Entity Information in XMLAttributes Wrong
> ---------------------------------------------------
>
>                 Key: XERCESJ-38
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-38
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.0.0 [beta 2]
>         Environment: Operating System: Other
> Platform: Other
>            Reporter: Andy Clark
>
> The XMLDTDValidator normalizes attribute values based on
> their type. In the process, it updates the offsets and
> lengths of the entities in the XMLAttributes interface.
> However, this is wrong because the entity offsets and
> lengths only have meaning in relation to the attribute's
> non-normalized value.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to