From: SourceForge.net <no...@so...> - 2010-01-07 15:46:53
|
Feature Requests item #2927620, was opened at 2010-01-07 16:46 Message generated for change (Tracker Item Submitted) made by bblankenburg You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=2927620&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bastian Blankenburg (bblankenburg) Assigned to: Nobody/Anonymous (nobody) Summary: Child element qualifier Initial Comment: I had several cases where an element has a kind of ID child element (as opposed to an ID attribute). I thus wrote an element qualifier which compares the first child elements of the control and test elements, respectively, with a given element qualifier. Together with my previous feature request (2927527), I use it e.g. this way: qualifier = new ConjunctiveElementQualifier( new ElementNameQualifier(), new DisjunctiveElementQualifier( new ChildElementQualifier("abbreviation", nameAndTextQualifier), new ChildElementQualifier("validity", nameAndTextQualifier), new ChildElementQualifier("date", nameAndTextQualifier))); This works in my case because each interesting element has exactly one of "abbreviation", "validity" or "date" child elements. Otherwise, one would need an additional qualifier which looks up the appropriate qualifier based on the element name. Source is attached. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=2927620&group_id=23187 |