Last Comment Bug 342319 - bind/@relevant on element fails to apply to child attributes
: bind/@relevant on element fails to apply to child attributes
Status: RESOLVED WONTFIX
:
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: xforms
: Stephen Pride
:
Mentors:
Depends on:
Blocks: 326372
  Show dependency treegraph
 
Reported: 2006-06-21 10:31 PDT by Leigh L. Klotz, Jr.
Modified: 2016-07-15 14:46 PDT (History)
0 users
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
XHTML+XForms test case (1.46 KB, application/xhtml+xml)
2006-06-21 10:32 PDT, Leigh L. Klotz, Jr.
no flags Details

Description Leigh L. Klotz, Jr. 2006-06-21 10:31:41 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

 <bind nodeset="/data/test5" relevant="false()" /> 
doesn't propgate relevant to 
  /data/test5/@x 
but it does propagate relevant  to 
  /data/test5/child

http://www.w3.org/TR/xforms/slice6.html#model-prop-relevant says "Inheritance Rules: If any ancestor node evaluates to XPath false, this value is treated as false. Otherwise, the local value is used."  So the question is whether the owning element is an ancestor of an attribute in the XPath data model.  In http://www.w3.org/TR/xpath#axes is says "the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; thus, the ancestor axis will always include the root node, unless the context node is the root node"  which doesn't specifically mention attributes, but the remaining rules in the section (preceeding, for example) specifically exclude attribute nodes on parents, so by implication the containing element is an ancestor of its attributes.


Reproducible: Always

Steps to Reproduce:
Try the attached XHTML file.  No xf:input controls should show.
The posted instance should contain only <data />.

Actual Results:  
xf:input elements bound to attribute children of elements with relevant=false show in the UI (i.e., do not have the :disabled CSS property) and show up in the submitted instance.

Expected Results:  
xf:input elements bound to attribute children of elements with relevant=false should not show in the UI (i.e., should have the :disabled CSS property) and should now show up in the submitted instance.

See attached test case.
Comment 1 Leigh L. Klotz, Jr. 2006-06-21 10:32:36 PDT
Created attachment 226507 [details]
XHTML+XForms test case
Comment 2 aaronr 2006-06-21 10:42:47 PDT
Hmmm, if I read the testcase correctly, the test2 input should show and upon submission we should see a data node containing two element nodes, test1 and test2 (neither with attributes).  Could you double check, Leigh?
Comment 3 Leigh L. Klotz, Jr. 2006-06-21 12:37:21 PDT
Yes, I was wrong and you are right. 
I had added some cases that I failed to take account of. 

Your description is accurate, but just to be clear, here is what I should have said in "Steps to Reproduce" (i.e., with your corrections noted).

Steps to Reproduce:
Try the attached XHTML file.  
Of the input controls, only the test2 control should show.
The posted instance should contain a <data> element
two element children, test1 and test2, neither with attributes.
Comment 4 David Bolter [:davidb] 2016-02-04 12:20:42 PST
RIP xforms

Note You need to log in before you can comment on or make changes to this bug.