First-principles calculations of ELNES and XANES of selected wide-gap materials: Dependence on crystal structure and orientation