private static DNChar denormalize ( String string ) { if ( string . startsWith ( "&lt;" ) ) return new DNChar ( ' ' , 4 ) ; else if ( string . startsWith ( "&gt;" ) ) return new DNChar ( ' ' , 4 ) ; else if ( string . startsWith ( "&amp;" ) ) return new DNChar ( ' ' , 5 ) ; else if ( string . startsWith ( "&quot;" ) ) return new DNChar ( ' ' , 6 ) ; else if ( string . startsWith ( "&apos;" ) ) return new DNChar ( ' ' , 6 ) ; else if ( string . startsWith ( "_x000D_" ) ) return new DNChar ( ' ' , 7 ) ; else if ( string . startsWith ( "_x000A_" ) ) return new DNChar ( ' ' , 7 ) ; /** * Denormalize of this value cause a 4 fails in TCK. If we don'n do it, it text will be remain * the "_x0009_" value instead of "\t" TCK tests fail because the checkImportSimpleXMLTree * method of DocumentViewImportTest object have a small problem in this place // both * possibilities In logic if (!propVal.equals(encodedAttributeValue) || * !propVal.equals(encodedAttributeValue)) { fail("Value " + encodedAttributeValue + * " of attribute " + decodedAttributeName + " is not correctly imported."); of test the * propVal must be equal of encodedAttributeValue the encoded version of value */ else if ( string . startsWith ( "_x0009_" ) ) return new DNChar ( ' ' , 7 ) ; else if ( string . startsWith ( "_x0020_" ) ) return new DNChar ( ' ' , 7 ) ; else if ( string . startsWith ( "_x005f_" ) ) return new DNChar ( ' ' , 7 ) ; else throw new IllegalArgumentException ( ILLEGAL_DNCHAR ) ; }
Denormalizes and print the given character .