String xml1 = "<A xmlns='http://openuri.org/sgs'>\ta\ta\t</A>";
String xml2 = "<B xmlns='http://openuri.org/sgs'>\tb\tb\t</B>";
String xml3 = "<C xmlns='http://openuri.org/sgs'>\tc\tc\t</C>";
ADocument d1 = ADocument.Factory.parse(xml1);
XmlString a = d1.xgetA();
assertTrue(a.schemaType().equals(XmlString.type));
assertEquals("\ta\ta\t", a.stringValue());
ADocument d2 = ADocument.Factory.parse(xml2);
XmlString b = d2.xgetA();
assertTrue(d2.schemaType().equals(BDocument.type));
assertTrue(b.schemaType().equals(XmlNormalizedString.type));
assertEquals(" b b ", b.stringValue());
ADocument d3 = ADocument.Factory.parse(xml3);
XmlString c = d3.xgetA();
assertTrue(d3.schemaType().equals(CDocument.type));
assertTrue(c.schemaType().equals(XmlToken.type));
assertEquals("c c", c.stringValue());
}