This bonnet strut solution I purchased for $5.00 US from JC Whitney, a mail order company in the U.S. The arm is spring loaded and drops down to prevent the hood/bonnet from closing.
This part is identified in the JC Whitney catalog as a "Lift support repair bracket" part number 13UC4688T. Be aware that JC Whitney has relatively high mailing costs, especially outside the United States.
I prefer this solution to the original working bonnet struts, not only will this solution never need replacing, but the bonnet will never close until you want it to.
This is a picture of the bonnet strut brace installed on the defective bonnet strut.
The following photographs show the hood/bonnet strut brace installed.
With the bonnet in the open position, the brace drops down to hold the bonnet open.
Jaguar XJ-S Home Page
Bernard Embden's Home Page