script and stylesheet processing, resolved #6, #7