fix xs:documentation; add tests