commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1148166 - /commons/proper/lang/trunk/src/site/xdoc/article3_0.xml
Date Tue, 19 Jul 2011 05:09:47 GMT
Author: bayard
Date: Tue Jul 19 05:09:46 2011
New Revision: 1148166

Fixing documentation; it was pointing to UnicodeEscaper and not NumericEntityEscaper. Also
updated the API to not be Range based as we dropped that. 


Modified: commons/proper/lang/trunk/src/site/xdoc/article3_0.xml
--- commons/proper/lang/trunk/src/site/xdoc/article3_0.xml (original)
+++ commons/proper/lang/trunk/src/site/xdoc/article3_0.xml Tue Jul 19 05:09:46 2011
@@ -142,14 +142,14 @@ available in the <a href="userguide.html
 <p>Here we see that <code>ESCAPE_XML</code> is a '<code>CharSequenceTranslator</code>',
which in turn is made up of two lookup translators based on the basic XML escapes and another
to escape apostrophes. This shows one way to combine translators. Another can be shown by
looking at the example to achieve the old XML escaping functionality (escaping non-ASCII):
-          StringEscapeUtils.ESCAPE_XML.with( new UnicodeEscaper(Range.between(0x7f, Integer.MAX_VALUE)
) );
+          StringEscapeUtils.ESCAPE_XML.with( NumericEntityEscaper.between(0x7f, Integer.MAX_VALUE)
 <p>That takes the standard Commons Lang provided escape functionality, and adds on
another translation layer. Another JIRA requested option was to also escape non-printable
ASCII, this is now achievable with a modification of the above: </p>
               new AggregateTranslator(
-                  new UnicodeEscaper(Range.between(0, 31)),
-                  new UnicodeEscaper(Range.between(0x80, Integer.MAX_VALUE))
+                  NumericEntityEscaper.between(0, 31),
+                  NumericEntityEscaper.between(0x80, Integer.MAX_VALUE)

View raw message