Re: bin:shift
Martin Honnen <[email protected]> Fri, 18 Dec 2020 12:36:56 +0100
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
Am 18.12.2020 um 12:28 schrieb Joel Kalvesmaki: > In using bin:shift() I am getting some unexpected results. > > bin:shift(xs:base64Binary($i),1) > > $i = 'AfgA' > expected = 'A/AA' > actual = '//AA' > > Perhaps better seen in binary: > input : 000000 011111 100000 000000 > expected: 000000 111111 000000 000000 > actual : 111111 111111 000000 000000 > > I've gotten this error with $i as Af4= and some other test values > that begin Af, but AgAA returns what I expect (BAAA). > > I'm not certain if the problem is my own head (frequent occurrence) or > Saxon's implementation of bin:shift(). Any ideas out there? In such cases I tend to look at the result of other implementations, BaseX for let $i := 'AfgA' return bin:shift(xs:base64Binary($i),1) agrees with you: "A/AA" _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help