Hierarchical Identifier Attribute for HTML Element Relationships
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
HTML lacks built-in support for indicating logical relationships among elements, leading to incorrect inference of relationships based on nesting, which affects the hierarchy of elements in the DOM tree.
Innovation Solution
Introducing a hierarchical identifier attribute that complements the standard HTML id attribute, allowing for the indication of parent-child relationships and enabling the creation of an element tree that reflects logical relationships independent of the DOM hierarchy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If HTML elements are identified using only the standard id attribute, then the identification system remains simple, but logical relationships among elements cannot be accurately indicated
Solution Approach 1:
The identifier system is segmented into two distinct parts: the standard HTML id attribute for basic identification and the new hierarchical identifier attribute for indicating relationships. This segmentation allows each attribute to serve its specific function without interference, resolving the contradiction between maintaining simplicity and accurately indicating relationships.
Solution Approach 2:
The hierarchical identifier attribute is nested within the existing HTML element structure, complementing the standard id attribute rather than replacing it. This nested approach allows the relationship indication capability to be added without fundamentally altering the existing simple identifier system.
2Reliability
If element hierarchy in DOM tree is based on nesting position in HTML document, then the DOM structure is easy to generate, but the hierarchy does not reflect logical relationships among elements
Solution Approach 1:
The hierarchical identifier attribute acts as an intermediary between the HTML document structure and the DOM tree structure. It provides explicit relationship information that mediates the construction process, allowing the DOM to accurately reflect logical relationships without being constrained by document nesting position.
3Adaptability or versatility
If a single id attribute is used for HTML elements, then the attribute system remains simple, but parent-child relationships cannot be indicated
Solution Approach 1:
The hierarchical identifier attribute is designed to be universally applicable to any HTML element that requires relationship indication. It provides multi-functionality by encoding parent-child relationships, sibling relationships, and hierarchical positioning information within a single attribute structure, enhancing adaptability without proportionally increasing complexity.
Data Source
AI summary
Elements within HTML based applications may be logically related; however, HTML does not have built-in support for indicating these relationships, such as parent-child relationships. Instead, relationships among HTML elements are not utilized or are incorrectly inferred based on nesting of HTML elements within an HTML document. As a result, when creating a DOM for an HTML document, the hierarchy of elements in the DOM tree is based on coded locations of elements within the HTML document rather than logical relationships among elements. To allow for indication of logical relationships, a hierarchical identifier attribute may be used in conjunction with the HTML id attribute. For example, two elements may include a hierarchical identifier of “person” with base identifiers of “name” and “address”.


