<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">I might be doing wrong, but for now I have the strong impression that \xmlchainatt is at fault. It does not break the callchain as soon as a match is found.<br>
Also according the manual xml-mkiv, \xmlchainatt{#1}{testx}{no-test} should return "no-test" but returns nothing. I would very much helped if these macros react is I thin they should.<br>
Is this my fault?<br>
<br>
Hans van der Meer<br>
<br>
Minimal example<br>
<br>
% test chainttribute failure.<br>
\startxmlsetups demo:chainatt<br>
        \xmlsetsetup{#1}{root|node|innernode}{demo:chainatt:*}<br>
\stopxmlsetups<br>
\xmlregisterdocumentsetup{demo}{demo:chainatt}<br>
\startxmlsetups demo:chainatt:root<br>
        root: xmlatt <test> = <\xmlatt{#1}{test}>\crlf<br>
        root: xmlchainatt <test> = <\xmlchainatt{#1}{test}>\crlf<br>
        \xmlall{#1}{*}<br>
\stopxmlsetups<br>
\startxmlsetups demo:chainatt:node<br>
        -- node: xmlatt test = <\xmlatt{#1}{test}>\crlf<br>
        -- node: xmlchainatt <node> = \xmlchainatt{#1}{test}\crlf<br>
        -- node: xmlchainattdef <node> = \xmlchainattdef{#1}{notest}{no-test}\crlf<br>
<br>
\stopxmlsetups<br>
\startxmlsetups demo:chainatt:innernode<br>
        ---- innernode: xmlatt test = <\xmlattdef{#1}{test}{nono}>\crlf<br>
        ---- innernode: xmlchainatt <test> = \xmlchainatt{#1}{test}\crlf<br>
\stopxmlsetups<br>
\startbuffer[chainatt]<br>
<root test="abc"><br>
  <node test="pqr"><br>
    <innernode test="xyz"/><br>
  </node><br>
</root><br>
\stopbuffer<br>
\starttext<br>
\ConTeXt-version=\contextversion\blank<br>
Manual on xml-mkiv page 22 on \tex{xmlchainatt} reads:<br>
returns the value of attribute NAME or empty if no such attribute exists; backtracks till a match is found\blank<br>
\xmlprocessbuffer{demo}{chainatt}{}\blank<br>
However, does not stop when backtracking finds "a match".<br>
\stoptext<br>
<br>
<br>
</div>
</span></font></div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
<br>
</div>
</span></font></div>
</body>
</html>