* </rawName>
* </pre>
*/
public void testDefaultHandling() throws Exception
{
SAXConfigurationHandler handler = new SAXConfigurationHandler( );
final String rootURI = "";
final String rootlocal = "rawName";
final String rootraw = "rawName";
final String childURI = "namespaceURI";
final String childlocal = "localName";
final String childraw = "child:" + childlocal;
final String childvalue = "value";
final String attqName = "attqName";
final String attValue = "attValue";
final String emptylocal = "emptyElement";
final String emptyraw = emptylocal;
final AttributesImpl emptyAttributes = new AttributesImpl();
final AttributesImpl attributes = new AttributesImpl();
attributes.addAttribute("",attqName,attqName,
"CDATA",attValue);
final AttributesImpl childAttributes = new AttributesImpl();
childAttributes.addAttribute("", "child", "xmlns:child", "CDATA", childURI);
handler.startDocument();
handler.startPrefixMapping( "child", childURI );
handler.startElement( rootURI, rootlocal, rootraw, attributes );
handler.startElement( childURI,
childlocal,
childraw,
childAttributes );
handler.characters( childvalue.toCharArray(), 0, childvalue.length() );
handler.endElement( childURI, childlocal, childraw );
handler.startElement( rootURI, emptylocal, emptyraw, emptyAttributes );
handler.endElement( rootURI, emptylocal, emptyraw );
handler.endElement( null, null, rootraw);
handler.endPrefixMapping( "child" );
handler.endDocument();
final Configuration configuration = handler.getConfiguration();
assertEquals( attValue, configuration.getAttribute(attqName));
assertEquals( childvalue, configuration.getChild(childraw).getValue());
assertEquals( "", configuration.getChild(childraw).getNamespace() );
assertEquals( rootraw, configuration.getName());
assertEquals( "test", configuration.getChild(emptyraw).getValue( "test" ) );