Skip to Content
XQuery
book

XQuery

by Priscilla Walmsley
March 2007
Intermediate to advanced
512 pages
21h 15m
English
O'Reilly Media, Inc.
Content preview from XQuery

xs:base64Binary

The primitive type xs:base64Binary represents binary data in base-64 encoding. The following rules apply to xs:base64Binary values:

  • The following characters are allowed: the letters A through Z (uppercase and lowercase), digits 0 through 9, the plus sign (+), the slash (/), the equals sign (=), and XML whitespace characters.

  • XML whitespace characters can appear anywhere in the value.

  • The number of nonwhitespace characters must be divisible by four.

  • Equals signs, which are used as padding, can only appear at the end of the value, and there can be zero, one, or two of them. If there are two equals signs, they must be preceded by one of the following characters: A, Q, g, w. If there is only one equals sign, it must be preceded by one of the following characters: A, E, I, M, Q, U, Y, c, g, k, o, s, w, 0, 4, 8.

Values of type xs:base64Binary can be cast to and from xs:hexBinary, xs:string, and xs:untypedAtomic. When cast to xs:string, an xs:base64Binary value is converted to its canonical representation, which contains no whitespace characters except for a line feed (#xA) character inserted after every 76 characters and at the end.

Note that these rules for acceptable base-64 values are rather strict, and processors are expected to enforce the rules strictly. This differs from practice elsewhere, and some software may generate "base 64" that doesn't meet these rules.

Table B-2 lists some values of the xs:base64Binary type. For more information on base-64 encoding, see RFC ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

XQuery, 2nd Edition

XQuery, 2nd Edition

Priscilla Walmsley
XPath and XPointer

XPath and XPointer

John Simpson
XSLT

XSLT

Doug Tidwell

Publisher Resources

ISBN: 0596006349Errata