title: Getting a substring of an attribute in XPATH
body: <p>Given</p>
  
  <pre><code>&lt;foo&gt;
    &lt;bar baz="Hello, World!"&gt;
  &lt;/foo&gt;
  </code></pre>
  
  <p>How do I all but the last 4 characters of @baz? One of my attempts was:</p>
  
  <pre><code>/foo/bar/@baz[substring( ., 0, -4 )]
  </code></pre>