Project

Profile

Help

Bug #4251 ยป stacktrace.txt

Tony Graham, 2019-07-12 18:56

 
1
java.lang.NullPointerException
2
        at net.sf.saxon.expr.VariableReference.computeCardinality(VariableReference.java:395)
3
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1196)
4
        at net.sf.saxon.expr.Expression.getDependencies(Expression.java:772)
5
        at net.sf.saxon.expr.Expression.computeDependencies(Expression.java:1258)
6
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1195)
7
        at net.sf.saxon.expr.Expression.getCardinality(Expression.java:714)
8
        at net.sf.saxon.expr.parser.TypeChecker.staticTypeCheck(TypeChecker.java:159)
9
        at net.sf.saxon.expr.GeneralComparison.typeCheck(GeneralComparison.java:211)
10
        at com.saxonica.ee.optim.IndexedFilterExpression.optimize(IndexedFilterExpression.java:185)
11
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
12
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
13
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
14
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
15
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
16
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
17
        at net.sf.saxon.expr.UnaryExpression.optimize(UnaryExpression.java:102)
18
        at com.saxonica.ee.bytecode.ByteCodeCandidate.optimize(ByteCodeCandidate.java:76)
19
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:230)
20
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:334)
21
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
22
        at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1150)
23
        at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:406)
24
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
25
        at net.sf.saxon.expr.FilterExpression.optimize(FilterExpression.java:315)
26
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
27
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
28
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
29
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
30
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
31
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
32
        at net.sf.saxon.expr.instruct.Choose.optimize(Choose.java:502)
33
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
34
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
35
        at net.sf.saxon.expr.instruct.Block.optimize(Block.java:658)
36
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
37
        at com.saxonica.ee.trans.TemplateRuleInitializer.init(TemplateRuleInitializer.java:63)
38
        at com.saxonica.ee.trans.TemplateRuleEE.initialize(TemplateRuleEE.java:85)
39
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
40
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
41
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
42
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
43
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
44
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
45
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
46
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
47
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
48
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
49
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
50
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
51
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
52
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
53
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
54
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
55
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
56
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
57
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
58
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
59
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
60
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
61
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
62
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
63
        at net.sf.saxon.expr.instruct.ForEach.lambda$processLeavingTail$0(ForEach.java:484)
64
        at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:128)
65
        at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:484)
66
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
67
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
68
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
69
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
70
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
71
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
72
        at net.sf.saxon.expr.instruct.ElementCreator.constructElement(ElementCreator.java:432)
73
        at net.sf.saxon.expr.instruct.ElementCreator.evaluateItem(ElementCreator.java:375)
74
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
75
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
76
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
77
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
78
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
79
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
80
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
81
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
82
        at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
83
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
84
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
85
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
86
        at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:425)
87
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
88
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
89
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
90
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
91
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
92
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
93
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
94
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
95
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
96
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
97
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
98
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
99
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
100
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
101
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
102
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:721)
103
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
104
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
105
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
106
        at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:747)
107
        at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347)
108
        at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:311)
109
        at net.sf.saxon.Transform.processFile(Transform.java:1287)
110
        at net.sf.saxon.Transform.doTransform(Transform.java:815)
111
        at net.sf.saxon.Transform.main(Transform.java:80)
112
java.lang.RuntimeException: Internal error evaluating template rule  at line 98 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/generateBookmarks.xsl
113
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
114
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
115
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
116
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
117
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
118
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
119
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
120
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
121
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
122
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
123
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
124
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
125
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
126
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
127
        at net.sf.saxon.expr.instruct.ForEach.lambda$processLeavingTail$0(ForEach.java:484)
128
        at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:128)
129
        at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:484)
130
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
131
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
132
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
133
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
134
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
135
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
136
        at net.sf.saxon.expr.instruct.ElementCreator.constructElement(ElementCreator.java:432)
137
        at net.sf.saxon.expr.instruct.ElementCreator.evaluateItem(ElementCreator.java:375)
138
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
139
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
140
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
141
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
142
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
143
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
144
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
145
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
146
        at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
147
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
148
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
149
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
150
        at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:425)
151
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
152
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
153
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
154
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
155
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
156
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
157
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
158
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
159
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
160
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
161
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
162
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
163
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
164
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
165
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
166
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:721)
167
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
168
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
169
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
170
        at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:747)
171
        at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347)
172
        at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:311)
173
        at net.sf.saxon.Transform.processFile(Transform.java:1287)
174
        at net.sf.saxon.Transform.doTransform(Transform.java:815)
175
        at net.sf.saxon.Transform.main(Transform.java:80)
176
Caused by: java.lang.NullPointerException
177
        at net.sf.saxon.expr.VariableReference.computeCardinality(VariableReference.java:395)
178
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1196)
179
        at net.sf.saxon.expr.Expression.getDependencies(Expression.java:772)
180
        at net.sf.saxon.expr.Expression.computeDependencies(Expression.java:1258)
181
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1195)
182
        at net.sf.saxon.expr.Expression.getCardinality(Expression.java:714)
183
        at net.sf.saxon.expr.parser.TypeChecker.staticTypeCheck(TypeChecker.java:159)
184
        at net.sf.saxon.expr.GeneralComparison.typeCheck(GeneralComparison.java:211)
185
        at com.saxonica.ee.optim.IndexedFilterExpression.optimize(IndexedFilterExpression.java:185)
186
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
187
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
188
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
189
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
190
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
191
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
192
        at net.sf.saxon.expr.UnaryExpression.optimize(UnaryExpression.java:102)
193
        at com.saxonica.ee.bytecode.ByteCodeCandidate.optimize(ByteCodeCandidate.java:76)
194
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:230)
195
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:334)
196
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
197
        at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1150)
198
        at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:406)
199
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
200
        at net.sf.saxon.expr.FilterExpression.optimize(FilterExpression.java:315)
201
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
202
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
203
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
204
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
205
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
206
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
207
        at net.sf.saxon.expr.instruct.Choose.optimize(Choose.java:502)
208
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
209
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
210
        at net.sf.saxon.expr.instruct.Block.optimize(Block.java:658)
211
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
212
        at com.saxonica.ee.trans.TemplateRuleInitializer.init(TemplateRuleInitializer.java:63)
213
        at com.saxonica.ee.trans.TemplateRuleEE.initialize(TemplateRuleEE.java:85)
214
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
215
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
216
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
217
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
218
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
219
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
220
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
221
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
222
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
223
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
224
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
225
        ... 62 more
226
java.lang.RuntimeException: Internal error evaluating template rule  at line 137 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/baseProcessing.xsl
227
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
228
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
229
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
230
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
231
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
232
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
233
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
234
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
235
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
236
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
237
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
238
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
239
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
240
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
241
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:721)
242
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
243
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
244
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
245
        at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:747)
246
        at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347)
247
        at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:311)
248
        at net.sf.saxon.Transform.processFile(Transform.java:1287)
249
        at net.sf.saxon.Transform.doTransform(Transform.java:815)
250
        at net.sf.saxon.Transform.main(Transform.java:80)
251
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 98 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/generateBookmarks.xsl
252
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
253
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
254
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
255
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
256
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
257
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
258
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
259
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
260
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
261
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
262
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
263
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
264
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
265
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
266
        at net.sf.saxon.expr.instruct.ForEach.lambda$processLeavingTail$0(ForEach.java:484)
267
        at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:128)
268
        at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:484)
269
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
270
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
271
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
272
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
273
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
274
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
275
        at net.sf.saxon.expr.instruct.ElementCreator.constructElement(ElementCreator.java:432)
276
        at net.sf.saxon.expr.instruct.ElementCreator.evaluateItem(ElementCreator.java:375)
277
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
278
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
279
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
280
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
281
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
282
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
283
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
284
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
285
        at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
286
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
287
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
288
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
289
        at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:425)
290
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
291
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
292
        ... 23 more
293
Caused by: java.lang.NullPointerException
294
        at net.sf.saxon.expr.VariableReference.computeCardinality(VariableReference.java:395)
295
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1196)
296
        at net.sf.saxon.expr.Expression.getDependencies(Expression.java:772)
297
        at net.sf.saxon.expr.Expression.computeDependencies(Expression.java:1258)
298
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1195)
299
        at net.sf.saxon.expr.Expression.getCardinality(Expression.java:714)
300
        at net.sf.saxon.expr.parser.TypeChecker.staticTypeCheck(TypeChecker.java:159)
301
        at net.sf.saxon.expr.GeneralComparison.typeCheck(GeneralComparison.java:211)
302
        at com.saxonica.ee.optim.IndexedFilterExpression.optimize(IndexedFilterExpression.java:185)
303
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
304
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
305
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
306
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
307
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
308
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
309
        at net.sf.saxon.expr.UnaryExpression.optimize(UnaryExpression.java:102)
310
        at com.saxonica.ee.bytecode.ByteCodeCandidate.optimize(ByteCodeCandidate.java:76)
311
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:230)
312
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:334)
313
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
314
        at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1150)
315
        at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:406)
316
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
317
        at net.sf.saxon.expr.FilterExpression.optimize(FilterExpression.java:315)
318
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
319
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
320
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
321
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
322
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
323
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
324
        at net.sf.saxon.expr.instruct.Choose.optimize(Choose.java:502)
325
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
326
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
327
        at net.sf.saxon.expr.instruct.Block.optimize(Block.java:658)
328
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
329
        at com.saxonica.ee.trans.TemplateRuleInitializer.init(TemplateRuleInitializer.java:63)
330
        at com.saxonica.ee.trans.TemplateRuleEE.initialize(TemplateRuleEE.java:85)
331
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
332
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
333
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
334
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
335
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
336
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
337
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
338
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
339
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
340
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
341
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
342
        ... 62 more
343
java.lang.RuntimeException: Internal error evaluating template rule  at line 103 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/baseProcessing.xsl
344
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
345
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
346
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
347
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
348
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
349
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:721)
350
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
351
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
352
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
353
        at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:747)
354
        at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347)
355
        at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:311)
356
        at net.sf.saxon.Transform.processFile(Transform.java:1287)
357
        at net.sf.saxon.Transform.doTransform(Transform.java:815)
358
        at net.sf.saxon.Transform.main(Transform.java:80)
359
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 137 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/baseProcessing.xsl
360
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
361
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
362
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
363
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
364
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
365
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
366
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
367
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
368
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
369
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
370
        ... 14 more
371
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 98 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/generateBookmarks.xsl
372
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
373
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
374
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
375
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
376
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
377
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
378
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
379
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
380
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
381
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
382
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
383
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
384
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
385
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
386
        at net.sf.saxon.expr.instruct.ForEach.lambda$processLeavingTail$0(ForEach.java:484)
387
        at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:128)
388
        at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:484)
389
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
390
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
391
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
392
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
393
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
394
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
395
        at net.sf.saxon.expr.instruct.ElementCreator.constructElement(ElementCreator.java:432)
396
        at net.sf.saxon.expr.instruct.ElementCreator.evaluateItem(ElementCreator.java:375)
397
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
398
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
399
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
400
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
401
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
402
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
403
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
404
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
405
        at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
406
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
407
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
408
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
409
        at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:425)
410
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
411
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
412
        ... 23 more
413
Caused by: java.lang.NullPointerException
414
        at net.sf.saxon.expr.VariableReference.computeCardinality(VariableReference.java:395)
415
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1196)
416
        at net.sf.saxon.expr.Expression.getDependencies(Expression.java:772)
417
        at net.sf.saxon.expr.Expression.computeDependencies(Expression.java:1258)
418
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1195)
419
        at net.sf.saxon.expr.Expression.getCardinality(Expression.java:714)
420
        at net.sf.saxon.expr.parser.TypeChecker.staticTypeCheck(TypeChecker.java:159)
421
        at net.sf.saxon.expr.GeneralComparison.typeCheck(GeneralComparison.java:211)
422
        at com.saxonica.ee.optim.IndexedFilterExpression.optimize(IndexedFilterExpression.java:185)
423
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
424
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
425
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
426
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
427
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
428
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
429
        at net.sf.saxon.expr.UnaryExpression.optimize(UnaryExpression.java:102)
430
        at com.saxonica.ee.bytecode.ByteCodeCandidate.optimize(ByteCodeCandidate.java:76)
431
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:230)
432
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:334)
433
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
434
        at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1150)
435
        at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:406)
436
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
437
        at net.sf.saxon.expr.FilterExpression.optimize(FilterExpression.java:315)
438
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
439
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
440
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
441
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
442
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
443
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
444
        at net.sf.saxon.expr.instruct.Choose.optimize(Choose.java:502)
445
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
446
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
447
        at net.sf.saxon.expr.instruct.Block.optimize(Block.java:658)
448
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
449
        at com.saxonica.ee.trans.TemplateRuleInitializer.init(TemplateRuleInitializer.java:63)
450
        at com.saxonica.ee.trans.TemplateRuleEE.initialize(TemplateRuleEE.java:85)
451
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
452
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
453
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
454
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
455
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
456
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
457
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
458
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
459
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
460
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
461
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
462
        ... 62 more
463
java.lang.RuntimeException: Internal error evaluating template rule  at line 26 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/baseProcessing.xsl
464
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
465
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
466
        at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:747)
467
        at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347)
468
        at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:311)
469
        at net.sf.saxon.Transform.processFile(Transform.java:1287)
470
        at net.sf.saxon.Transform.doTransform(Transform.java:815)
471
        at net.sf.saxon.Transform.main(Transform.java:80)
472
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 103 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/baseProcessing.xsl
473
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
474
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
475
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
476
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
477
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
478
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:721)
479
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
480
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
481
        ... 7 more
482
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 137 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/baseProcessing.xsl
483
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
484
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
485
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
486
        at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
487
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
488
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
489
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
490
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
491
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
492
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
493
        ... 14 more
494
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 98 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/generateBookmarks.xsl
495
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:371)
496
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
497
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
498
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
499
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
500
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
501
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
502
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
503
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
504
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
505
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
506
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
507
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
508
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
509
        at net.sf.saxon.expr.instruct.ForEach.lambda$processLeavingTail$0(ForEach.java:484)
510
        at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:128)
511
        at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:484)
512
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
513
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
514
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
515
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
516
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
517
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
518
        at net.sf.saxon.expr.instruct.ElementCreator.constructElement(ElementCreator.java:432)
519
        at net.sf.saxon.expr.instruct.ElementCreator.evaluateItem(ElementCreator.java:375)
520
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
521
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
522
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
523
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
524
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
525
        at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:179)
526
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
527
        at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
528
        at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
529
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
530
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
531
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
532
        at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:425)
533
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
534
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
535
        ... 23 more
536
Caused by: java.lang.NullPointerException
537
        at net.sf.saxon.expr.VariableReference.computeCardinality(VariableReference.java:395)
538
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1196)
539
        at net.sf.saxon.expr.Expression.getDependencies(Expression.java:772)
540
        at net.sf.saxon.expr.Expression.computeDependencies(Expression.java:1258)
541
        at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1195)
542
        at net.sf.saxon.expr.Expression.getCardinality(Expression.java:714)
543
        at net.sf.saxon.expr.parser.TypeChecker.staticTypeCheck(TypeChecker.java:159)
544
        at net.sf.saxon.expr.GeneralComparison.typeCheck(GeneralComparison.java:211)
545
        at com.saxonica.ee.optim.IndexedFilterExpression.optimize(IndexedFilterExpression.java:185)
546
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
547
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
548
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
549
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
550
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
551
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
552
        at net.sf.saxon.expr.UnaryExpression.optimize(UnaryExpression.java:102)
553
        at com.saxonica.ee.bytecode.ByteCodeCandidate.optimize(ByteCodeCandidate.java:76)
554
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:230)
555
        at net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:334)
556
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
557
        at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1150)
558
        at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:406)
559
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
560
        at net.sf.saxon.expr.FilterExpression.optimize(FilterExpression.java:315)
561
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
562
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
563
        at net.sf.saxon.expr.FunctionCall.optimize(FunctionCall.java:236)
564
        at net.sf.saxon.expr.SystemFunctionCall.optimize(SystemFunctionCall.java:238)
565
        at net.sf.saxon.functions.Exists$1.optimize(Exists.java:32)
566
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
567
        at net.sf.saxon.expr.instruct.Choose.optimize(Choose.java:502)
568
        at net.sf.saxon.expr.Operand.optimize(Operand.java:206)
569
        at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:617)
570
        at net.sf.saxon.expr.instruct.Block.optimize(Block.java:658)
571
        at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1201)
572
        at com.saxonica.ee.trans.TemplateRuleInitializer.init(TemplateRuleInitializer.java:63)
573
        at com.saxonica.ee.trans.TemplateRuleEE.initialize(TemplateRuleEE.java:85)
574
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
575
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
576
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251)
577
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:300)
578
        at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
579
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:191)
580
        at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:188)
581
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:531)
582
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:712)
583
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
584
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
585
        ... 62 more
586
Fatal error during transformation: java.lang.RuntimeException: Internal error evaluating template rule  at line 26 in module file:/P:/tgraham/pubsrc/xsl/xxxxx2pdf/baseProcessing.xsl
    (1-1/1)