DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27792>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27792 reporting of DOMError.relatedData when cdata sections are split Summary: reporting of DOMError.relatedData when cdata sections are split Product: Xerces2-J Version: 2.6.2 Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: Other Component: DOM AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] DOMError.relatedData is not being reported anywhere in DOMNormalizer during reporting of errors (reportDOMError). DOM L3 Core spec states that relatedData store 'the related DOMError.type dependent data if any'. Spec specificially states that when 'split-cdata-sections' is true 'a SEVERITY_WARNING with type "cdata-sections-splitted" is generated and the first CDATASection node in document order resulting from the split is returned by relatedData'. Under the description of the 'error-handler' parameter: 'When called, DOMError.relatedData will contain the closest node to where the error occurred. If the implementation is unable to determine this node, DOMError.relatedData will contain the Document node' [1] Currently, when an error is detected, reportDOMError is called and passes a node that relatedNode is set to. The proposed patch involves setting the value of DOMError.relatedData inside reportDOMError to this same node value (don't know if that's right - but currently, DOMLocatorImpl constructors set relatedNode equal to relatedData). Also, in normalizeNode when a cdata section containing ']]>' is split, we send the second node resulting from the split to reportDOMError - not sure if it matters for value of relatedNode, but for relatedData, spec says it must be the first node from the split. (Failing DOM L3 Core test documentnormalizedocument06 as a result) With this patch, in the event that relatedData is passed the value of null, I couldn't find a way to allow relatedData to then take on the value of the document node [1] within the reportDOMError method without adding addit'l parameters. Didn't think it would be good to write a new method to exclusively deal with relatedData either... [1]http://www.w3.org/TR/2004/PR-DOM-Level-3-Core-20040205/core.html#parameter- error-handler --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
