Added function that checks if character is restricted

- This function according http://www.w3.org/TR/xml11/#charsets
  verifies if the character is a restricted character, and returns true
  if it is or false if it's not.
Minor style changes to code

- Just moving code a bit, removing some extra newlines