title: Xpath transformation not working in java
body: <p>This is my xml document. I want to sign only the userID part using xml signature. I am using xpath transformation to select that particular element.</p>
  
  <pre><code>&lt;samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
  Version="2.0" IssueInstant="2012-05-22T13:40:52:390" ProtocolBinding="urn:oasis:na
  mes:tc:SAML:2.0:bindings:HTTP-POST" AssertionConsumerServiceURL="localhos
  t:8080/consumer.jsp"&gt;
  &lt;UserID&gt;
     xyz
  &lt;/UserID&gt;
  &lt;testing&gt;
     text
  &lt;/testing&gt;
  &lt;saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"&gt;
     http://localhost:8080/saml/SProvider.jsp
  &lt;/saml:Issuer&gt;
  &lt;/samlp:AuthnRequest&gt;
  </code></pre>
  
  <p><br>
  I am using the following code to add the transformations : <br></p>
  
  <pre><code>transformList.add(exc14nTransform);
   transformList.add(fac.newTransform(Transform.XPATH, new XPathFilterParameterSpec("samlp:AuthnRequest/UserID xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"")));
  </code></pre>
  
  <p><br>
  But I get the following :</p>
  
  <pre><code>Original Exception was javax.xml.transform.TransformerException: Extra illegal t
  okens: 'xmlns', ':', 'samlp', '=', '"urn:oasis:names:tc:SAML:2.0:protocol"'
  </code></pre>
  
  <p><br>
  So, I tried removing the xmlns part. </p>
  
  <pre><code>transformList.add(fac.newTransform(Transform.XPATH, new XPathFilterParameterSpec("samlp:AuthnRequest/UserID")));
  </code></pre>
  
  <p><br>
  But it signs the whole document and gives the following message : </p>
  
  <pre><code>com.sun.org.apache.xml.internal.security.utils.CachedXPa
  thFuncHereAPI fixupFunctionTable
  INFO: Registering Here function
  </code></pre>
  
  <p><br>
  What is the problem?<br>
  <strong>EDIT</strong><br>
  As @Jörn Horstmann said the message is just a log or something like that. Now the problem is that even after giving the xpath query the whole document is signed instead of just the UserID. I confirmed this by changing the value of <code>&lt;testing&gt;</code>element after signing the document. The result is that the document does not get validated(If it signed only the UserID part, then any changes made to <code>&lt;testing&gt;</code> should result in a valid signature .)</p>