header: {
enabled: "true",
dynamic: "true",
skipBeforeSection: "true",
addHeightToMargin: "true",
// chapterTitle: "(ancestor-or-self :: section) [2] / title // * [name ()! = 'a'] / text ()",
// chapterTitle: "string-join (ancestor-or-self :: section / title [.// text () [matches (., '[^ \\ d \\ s]')]] // * [name ()! = 'a'] / text (), '.') ",
chapterTitle: "replace (string-join (ancestor-or-self :: section / title // * [name ()! = 'a'] / text (), '.'), '([^ \\ s \ \ w]) \\. ',' $ 1 ') ",
leftOdd: {
enabled: "true",
style: "headerLeft",
border: 2, // TOP = 1; BOTTOM = 2; LEFT = 4; RIGHT = 8; NO_BORDER = 0; BOX = TOP + BOTTOM + LEFT + RIGHT;
borderColor: "0x000000",
// There are predefined variables $ bookTitle, $ authorFullName, $ authorLastName, $ authorFirstLastName, $ authorFirstInitialLastName, $ authorAllInitialsLastName
// There are predefined dynamic variables $ pageNum, $ chapterTitle
// There are predefined custom functions fb: cut-right (string, length) fb: cut-left (string, length)
// There are standard xquery functions http://www.w3schools.com/xpath/xpath_functions.asp
// query: "string-join (($ authorFirstLastName, $ bookTitle), ',')"
query: "fb: cut-right ($ bookTitle, 30)"
},
centerOdd: {
enabled: "true",
style: "headerCenter",
border: 2,
query: "$ pageNum"
},
rightOdd: {
enabled: "true",
style: "headerRight",
query: "fb: cut-right ($ chapterTitle, 45)"
},
leftEven: {
enabled: "true",
style: "headerLeft",
border: 2,
borderColor: "0x000000",
query: "fb: cut-right ($ bookTitle, 30)"
},
centerEven: {
enabled: "true",
style: "headerCenter",
border: 2,
query: "$ pageNum"
},
rightEven: {
enabled: "true",
style: "headerRight",
query: "fb: cut-right ($ chapterTitle, 45)"
}
},