/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULE_NAME="oj-html-attr-2def";const EXEMPT=["style","class"];const SHORT="A tag should not contain an attribute and a colon-prefixed attribute of the same name";const EXPLAIN=SHORT+"<p>For example:<p>"+"<div  id=\"id1\"  :id=\"[[mydiv]]\">";function getName(){return RULE_NAME}function getShortDescription(){return SHORT}function getDescription(){return EXPLAIN};function register(){return{"elem":_fnTags}};function _fnTags(ruleCtx,tagName){var attribs,attr,attr2,a,attrPos,issue;attribs=ruleCtx.node.attribs;for(attr in attribs){if(attr.charAt(0)===":"||EXEMPT.includes(attr)){continue}attr2=":"+attr;for(a in attribs){if(a===attr2){issue=new ruleCtx.Issue(`<${tagName}> contains attributes '${attr}' and '${attr2}'`);attrPos=ruleCtx.utils.DomUtils.getAttribPosition(ruleCtx.data,ruleCtx.node,attr);issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}}}};module.exports={getName,getDescription,getShortDescription,register};