Community
Participate
Working Groups
Build ID: I20071213-1700 Steps To Reproduce: 1. Create an XML document that defines a node with the attribute xml:space="preserve" 2. Create a grandchild of that node 3. Select and format the grandchild node, whitespace will not be preserved. More information: During selected region formatting, only the parent of that region is inspected for whitespace formatting constraints; however, the XML spec states that the xml:space intent applies to all descendants unless overridden by another instance of xml:space.
Created attachment 89071 [details] Patch to scan ancestors for formatting constraints This patch also includes code that addresses NPE issues in Bug 218030. This patch addresses the issue of selected region formatting failing to observe whitespace constraints that have been defined by ancestors older than a parent. Now, the ancestry tree is examined for explicit declarations of whitespace strategy (xml:space=(preserve|default)). If one is found, that strategy is applied to the constraints of the selected region for formatting. If one is not found, the parent or default's strategy is used.
fix looks good. released for this week's 3.0 m5 build
Reopening.
Marking as fixed by Nick instead of inbox.
verified in wtp 3.0 m5 20080211073521
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.