fixed missing ownerDocument on creation, add test cases
line length restriction