6. Inserting in generated content the name of the element which is the target of the CSS rule

Standard pseudo-function attr() can be used to insert in generated content the value of an attribute of the element which is the target of CSS rule.

Example:

xref {
content: "xref=" attr(linkend) " ";
}

Pseudo functions element-name(), element-local-name(), element-namespace-uri(), element-label() are similar to attr() except that they insert strings related to the name of the element which is the target of CSS rule.