Tom,
I check my 88 XJ electrical trouble shooting manual and determined it could be:
1) The dimmer switch is bad.
2) Corrosion in the C100 connector, it the connector that connects to the fuse box and is located in the engine compartment - doubt that.
3) The C102 connector. It is a 10 pin connector and says it is located behind the left hand headlamp. It has 2 rows of 5 pins. It is the connector ChiXJeff talked about.
I don't think the wiring changed that much over the years but a look at the manual for your year would be better than trusting my 88 manual.
I think I'd clean the C102 connector first and see if that fixes the problem. If not then when you get home I'd change the dimmer switch, they are less than $20 when I checked 2 weeks ago.
I changed the ignition switch 2 weeks ago and got the ignition switch adjusted then the dimmer switch. I pulled out of the garage and no lights - low or high beam. It took me a minute to realize I forgot to replug the connector into the dimmer switch.
With the mileage of your XJ I'd recommend IF you change out the dimmer switch to also change out the ignition switch. It not much more work and with that many miles it smart money to change the ignition switch. I needed 8, 9, & 10 mm ignition wrenches to to the job. I got a set a sears for $13. You will have to drop the steering wheel column to get better access.
Two weeks ago I changed the ignition switch, then a week later my head light switch failed. If I had known I would of change the headlight switch while I had the dash board apart.
So if you end up changing the dimmer switch I highly recommend the ignition swich be replaced. The same two bolts hold those switches to the column. The headlight switch is located in a different place but after having the circuit breaker inside it start resetting while driving with the headlights on I am becoming a believer in changing out the headlight switch when ever you chang the ignition switch.
HTH
Martin