@@ -1427,10 +1427,13 @@ LY_ERR lyd_new_opaq2(struct lyd_node *parent, const struct ly_ctx *ctx, const ch
14271427/**
14281428 * @brief Create new JSON attribute for an opaque data node. To create an XML attribute, use ::lyd_new_attr2().
14291429 *
1430- * @param[in] parent Parent opaque node for the attribute being created.
1431- * @param[in] module_name Name of the module of the attribute being created. There may be none.
1432- * @param[in] name Attribute name. It can include the module name as the prefix.
1433- * @param[in] value Attribute value, may be NULL.
1430+ * Note that for an attribute to be later resolved as YANG metadata, it needs @p module_nane and a prefix in @p name.
1431+ *
1432+ * @param[in] parent Parent opaque node for the attribute.
1433+ * @param[in] module_name Optional name of the module of the attribute.
1434+ * @param[in] name Attribute name with optional prefix, which is a module name. If the prefix is set, it is also stored
1435+ * as the explicit module name if @p module_name is not set.
1436+ * @param[in] value Optional attribute value.
14341437 * @param[out] attr Optional created attribute.
14351438 * @return LY_ERR value.
14361439 */
@@ -1440,10 +1443,12 @@ LY_ERR lyd_new_attr(struct lyd_node *parent, const char *module_name, const char
14401443/**
14411444 * @brief Create new XML attribute for an opaque data node. To create a JSON attribute, use ::lyd_new_attr().
14421445 *
1446+ * Note that for an attribute to be later resolved as YANG metadata, it needs @p module_ns and a prefix in @p name.
1447+ *
14431448 * @param[in] parent Parent opaque node for the attribute being created.
1444- * @param[in] module_ns Namespace of the module of the attribute being created. There may be none .
1445- * @param[in] name Attribute name. It can include an XML prefix.
1446- * @param[in] value Attribute value, may be NULL .
1449+ * @param[in] module_ns Optional namespace of the module of the attribute.
1450+ * @param[in] name Attribute name with optional prefix, which is an XML prefix.
1451+ * @param[in] value Optional attribute value .
14471452 * @param[out] attr Optional created attribute.
14481453 * @return LY_ERR value.
14491454 */
0 commit comments