p:set-attributes-002 (NW)

Tests that an error to be raised if attribute-name is 'xmlns'.

Test nw-set-attributes-002.xml is expected to fail with error code err:XC0059.

The pipeline


<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:set-attributes match="/doc" attributes="map { QName('http://www.w3.org/2000/xmlns/','x'): '5' }">
      <p:with-input>
         <doc attribute="3">
                  Some text
                  <!-- a comment -->
                  <?pi?>
               </doc>
      </p:with-input>
   </p:set-attributes>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Revision history

04 May 2024, Achim Berndzen

Changed Q{...} notation to call of function 'QName()'

04 May 2024, Norm Tovey-Walsh

Tests for p:set-attributes; adapted from ab-add-attribute-026.