Closed Bug 342319 Opened 18 years ago Closed 8 years ago

bind/@relevant on element fails to apply to child attributes

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Leigh.Klotz, Unassigned)

References

Details

Attachments

(1 file)

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.
Attached file XHTML+XForms test case
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?
Status: UNCONFIRMED → NEW
Ever confirmed: true
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.
Blocks: 326372
RIP xforms
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: