Support indent attribute on xforms <submission> element.

RESOLVED WONTFIX

Status

Core Graveyard
XForms
--
enhancement
RESOLVED WONTFIX
13 years ago
a year ago

People

(Reporter: Darin Fisher, Assigned: Doron Rosenberg (IBM))

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

13 years ago
Support indent attribute on xforms <submission> element.
(Assignee)

Comment 1

13 years ago
We are awaiting a response from the WG regarding indent.

Questions are:
  - what is the default behavior?  Submit the way it was defined in the
document, all on one line, pretty printed?
  - what if indent is false: single line, way defiend in the document?
(Assignee)

Updated

12 years ago
Assignee: aaronr → doronr
(Assignee)

Comment 2

12 years ago
Created attachment 207767 [details] [diff] [review]
patch
Attachment #207767 - Flags: review?(aaronr)
(Assignee)

Comment 3

12 years ago
Created attachment 207768 [details]
testcase

Updated

12 years ago
Blocks: 326372

Updated

12 years ago
Blocks: 326373

Comment 4

12 years ago
Comment on attachment 207767 [details] [diff] [review]
patch

>Index: extensions/xforms/nsXFormsSubmissionElement.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/xforms/nsXFormsSubmissionElement.cpp,v
>retrieving revision 1.49
>diff -u -r1.49 nsXFormsSubmissionElement.cpp
>--- extensions/xforms/nsXFormsSubmissionElement.cpp	3 Jan 2006 20:57:46 -0000	1.49
>+++ extensions/xforms/nsXFormsSubmissionElement.cpp	6 Jan 2006 23:07:30 -0000

>@@ -1226,7 +1229,47 @@
>       // honor cdata-section-elements (see xslt spec section 16.1)
>       if (cdataElements.IsEmpty())
>       {
>-        dest->AppendChild(destChild, getter_AddRefs(node));
>+        if (indent)
>+        {
>+          // Check if the textnode is only made up of whitespace characters
>+          nsAutoString nodeValue;
>+          destChild->GetNodeValue(nodeValue);
>+
>+          PRBool isWhitespaceOnly = PR_TRUE;
>+          nsAString::const_iterator start, end;
>+          nodeValue.BeginReading(start);
>+          nodeValue.EndReading(end);
>+
>+          PRUnichar temp;
>+          while (start != end && isWhitespaceOnly) {
>+            temp = *start++;
>+
>+            if ((temp != ' ') && (temp != '\t') && (temp != '\r') && (temp != '\n'))
>+              isWhitespaceOnly = PR_FALSE;
>+          }
>+

you can't make character comparisons like this with a PRUnichar, can you?  Maybe should use nsXFormsXPathXMLUtil::IsWhitespace()?
Attachment #207767 - Flags: review?(aaronr) → review-
RIP xforms
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.