% test chainttribute failure.
\startxmlsetups demo:chainatt
	\xmlsetsetup{#1}{root|node}{demo:chainatt:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:chainatt}
\startxmlsetups demo:chainatt:root
	root: attribute test = \xmlatt{#1}{test} --- xmllastatt = \xmllastatt\crlf
	root: chainattribute test = \xmlchainatt{#1}{test} --- xmllastatt = \xmllastatt\crlf
	\xmlall{#1}{*}
\stopxmlsetups
\startxmlsetups demo:chainatt:node
	First level child:\crlf
	node: attribute test = \xmlatt{#1}{test} --- xmllastatt = \xmllastatt\crlf
	node: chainattribute test = \xmlchainatt{#1}{test} --- xmllastatt = \xmllastatt\crlf
\stopxmlsetups
\startbuffer[chainatt]
<root test="abc">
  <node/>
</root>
\stopbuffer
\starttext
\currentdate-\currenttime\quad\ConTeXt-version=\contextversion\blank
The manual xml-mkiv page 22 on \tex{xmlchainatt} reads:\crlf
"returns the value of attribute NAME or empty if no such attribute exists; backtracks till a match is found"\crlf
And next on \tex{xmllastatt} it reads:\crlf
"returns the last attribute found (this avoids a lookup)"\blank
The last statement cannot be true because the attribute returned by \tex{xmlchainatt} is not retrieved with \tex{xmllastatt}, witness the following example.\blank
\xmlprocessbuffer{demo}{chainatt}{}\blank
\stoptext
