I'm trying to send a byte array from java code as a parameter to xslt. I declared the type as base64Binary in XSL and set the byte array as parameter. I get an error that the supplied value is byte. What am I doing wrong?
XSL:-
<xsl:param name="attachmentBytes" as="xs:base64Binary" />
Java code:-
byte[] bytes = "SAMPLE".getBytes();
transformer.setParameter("attachmentBytes", bytes);
transformer.transform(new DOMSource(sourceDocument), new StreamResult(targetStream));
Error code: XPTY0004: Required item type of value of variable is xs:base64Binary; supplied value has item type xs:byte