Closed Bug 16091 Opened 25 years ago Closed 25 years ago

xml:space="preserve" not working

Categories

(Core :: XML, defect, P3)

All
Windows 95
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: christinehoff4, Assigned: nisheeth_mozilla)

Details

Attachments

(2 files)

Using Commercial build 1999100618 Apprunner.

The attached XML file uses the xml:space attribute per the 2.10 section of the
XML 1.0 spec.
Expected result: The whitespace in the poem element should be preserved
Actual result: Parsing error occurs indicating document is not well-formed
Incorrect test - new one submitted. Page displays but does not preserve
whitespace.
Status: NEW → ASSIGNED
Target Milestone: M13
Setting milestone to M13 for now...
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
The spec says (section 2.10):
#  the value "preserve" indicates the intent that applications preserve all
#  the white space.

We do this already. That is, the parser preserves all white-space regardless.
In fact, this is our 'default' behaviour -- see below.

The spec further says:
#  The value "default" signals that applications' default white-space
#  processing modes are acceptable for this element

So we need not do anything special based on the value of xml:space, since our
'default' behaviour and the 'preserve' behaviour are identical.

Note that the xml:space 'attribute' does NOT imply ANYTHING about how the
document is layed out -- that would be the role of the white-space CSS property.
We support that fully already. The xml:space attribute is merely saying that we
should preserve the white-space in the document when parsing and making up the
document tree of the XML file.

To show that the parser is preserving white-space, you can use a stylesheet
containing merely:

   * { white-space: pre; }

...you will then see that any element with xml:space='preserve' does indeed have
its white-space preserved... just like any element with xml:space='default'.
i.e., all of them.

I hope that's clear!

I'm marking this WORKSFORME. If I've made some mistake, please reopen...
Adding 'verifyme' keyword
Keywords: verifyme
QA Contact: chrisd → petersen
Verified
Platform: PC
OS: Windows 98
Mozilla Build: 2000101020 M18 Trunk Build
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: