You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/12/31 00:01:17 UTC

svn commit: r1896561 [4/8] - in /xmlbeans: site/src/documentation/content/xdocs/ trunk/ trunk/gradle/ trunk/samples/ trunk/samples/AbstractTypes/ trunk/samples/Any/ trunk/samples/Any/src/org/apache/xmlbeans/samples/any/ trunk/samples/DateTime/ trunk/sa...

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/regex/RegularExpression.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/regex/RegularExpression.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/regex/RegularExpression.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/regex/RegularExpression.java Fri Dec 31 00:01:16 2021
@@ -25,8 +25,8 @@ import java.util.Stack;
  * A regular expression matching engine using Non-deterministic Finite Automaton (NFA).
  * This engine does not conform to the POSIX regular expression.
  *
- * <hr width="50%">
- * <h3>How to use</h3>
+ * <hr>
+ * <h2>How to use</h2>
  *
  * <dl>
  *   <dt>A. Standard way
@@ -48,37 +48,37 @@ import java.util.Stack;
  *
  * </dl>
  *
- * <h4>Case-insensitive matching</h4>
+ * <h3>Case-insensitive matching</h3>
  * <pre>
  * RegularExpression re = new RegularExpression(<var>regex</var>, "i");
  * if (re.matches(text) >= 0) { ...}
  * </pre>
  *
- * <h4>Options</h4>
- * <p>You can specify options to <a href="#RegularExpression(java.lang.String, java.lang.String)"><code>RegularExpression(</code><var>regex</var><code>, </code><var>options</var><code>)</code></a>
- *    or <a href="#setPattern(java.lang.String, java.lang.String)"><code>setPattern(</code><var>regex</var><code>, </code><var>options</var><code>)</code></a>.
+ * <h3>Options</h3>
+ * <p>You can specify options to {@link #RegularExpression(java.lang.String, java.lang.String)}
+ *    or {@link #setPattern(java.lang.String, java.lang.String)}
  *    This <var>options</var> parameter consists of the following characters.
  * </p>
  * <dl>
- *   <dt><a name="I_OPTION"><code>"i"</code></a>
+ *   <dt><a id="I_OPTION"><code>"i"</code></a>
  *   <dd>This option indicates case-insensitive matching.
- *   <dt><a name="M_OPTION"><code>"m"</code></a>
- *   <dd class="REGEX"><kbd>^</kbd> and <kbd>$</kbd> consider the EOL characters within the text.
- *   <dt><a name="S_OPTION"><code>"s"</code></a>
- *   <dd class="REGEX"><kbd>.</kbd> matches any one character.
- *   <dt><a name="U_OPTION"><code>"u"</code></a>
- *   <dd class="REGEX">Redefines <Kbd>\d \D \w \W \s \S \b \B \&lt; \></kbd> as becoming to Unicode.
- *   <dt><a name="W_OPTION"><code>"w"</code></a>
- *   <dd class="REGEX">By this option, <kbd>\b \B \&lt; \></kbd> are processed with the method of
+ *   <dt><a id="M_OPTION"><code>"m"</code></a>
+ *   <dd class="REGEX">^ and $ consider the EOL characters within the text.
+ *   <dt><a id="S_OPTION"><code>"s"</code></a>
+ *   <dd class="REGEX">. matches any one character.
+ *   <dt><a id="U_OPTION"><code>"u"</code></a>
+ *   <dd class="REGEX">Redefines \d \D \w \W \s \S \b \B \&lt; \> as becoming to Unicode.
+ *   <dt><a id="W_OPTION"><code>"w"</code></a>
+ *   <dd class="REGEX">By this option, \b \B \&lt; \> are processed with the method of
  *      'Unicode Regular Expression Guidelines' Revision 4.
  *      When "w" and "u" are specified at the same time,
- *      <kbd>\b \B \&lt; \></kbd> are processed for the "w" option.
- *   <dt><a name="COMMA_OPTION"><code>","</code></a>
+ *      \b \B \&lt; \> are processed for the "w" option.
+ *   <dt><a id="COMMA_OPTION"><code>","</code></a>
  *   <dd>The parser treats a comma in a character class as a range separator.
- *      <kbd class="REGEX">[a,b]</kbd> matches <kbd>a</kbd> or <kbd>,</kbd> or <kbd>b</kbd> without this option.
- *      <kbd class="REGEX">[a,b]</kbd> matches <kbd>a</kbd> or <kbd>b</kbd> with this option.
+ *      [a,b] matches a or , or b without this option.
+ *      [a,b] matches a or b with this option.
  *
- *   <dt><a name="X_OPTION"><code>"X"</code></a>
+ *   <dt><a id="X_OPTION"><code>"X"</code></a>
  *   <dd class="REGEX">
  *       By this option, the engine confoms to <a href="http://www.w3.org/TR/2000/WD-xmlschema-2-20000407/#regexs">XML Schema: Regular Expression</a>.
  *       The <code>match()</code> method does not do subsring matching
@@ -86,30 +86,24 @@ import java.util.Stack;
  *
  * </dl>
  *
- * <hr width="50%">
- * <h3>Syntax</h3>
- * <table border="1" bgcolor="#ddeeff">
- *   <tr>
- *    <td>
- *     <h4>Differences from the Perl 5 regular expression</h4>
- *     <ul>
- *      <li>There is 6-digit hexadecimal character representation  (<kbd>\u005cv</kbd><var>HHHHHH</var>.)
- *      <li>Supports subtraction, union, and intersection operations for character classes.
- *      <li>Not supported: <kbd>\</kbd><var>ooo</var> (Octal character representations),
- *          <Kbd>\G</kbd>, <kbd>\C</kbd>, <kbd>\l</kbd><var>c</var>,
- *          <kbd>\u005c u</kbd><var>c</var>, <kbd>\L</kbd>, <kbd>\U</kbd>,
- *          <kbd>\E</kbd>, <kbd>\Q</kbd>, <kbd>\N{</kbd><var>name</var><kbd>}</kbd>,
- *          <Kbd>(?{<kbd><var>code</var><kbd>})</kbd>, <Kbd>(??{<kbd><var>code</var><kbd>})</kbd>
- *     </ul>
- *    </td>
- *   </tr>
- * </table>
+ * <hr>
+ * <h2>Syntax</h2>
+ * <h3>Differences from the Perl 5 regular expression</h3>
+ * <ul>
+ *  <li>There is 6-digit hexadecimal character representation  (\u005cv<var>HHHHHH</var>.)
+ *  <li>Supports subtraction, union, and intersection operations for character classes.
+ *  <li>Not supported: \<var>ooo</var> (Octal character representations),
+ *      \G, \C, \l<var>c</var>,
+ *      \u005c u<var>c</var>, \L, \U,
+ *      \E, \Q, \N{<var>name</var>},
+ *      (?{<var>code</var>}), (??{<var>code</var>})
+ * </ul>
  *
- * <P>Meta characters are `<KBD>. * + ? { [ ( ) | \ ^ $</KBD>'.</P>
+ * <P>Meta characters are `. * + ? { [ ( ) | \ ^ $'.</P>
  * <ul>
  *   <li>Character
  *     <dl>
- *       <dt class="REGEX"><kbd>.</kbd> (A period)
+ *       <dt class="REGEX">. (A period)
  *       <dd>Matches any one character except the following characters.
  *       <dd>LINE FEED (U+000A), CARRIAGE RETURN (U+000D),
  *           PARAGRAPH SEPARATOR (U+2029), LINE SEPARATOR (U+2028)
@@ -117,131 +111,130 @@ import java.util.Stack;
  *       <dd>When <a href="#S_OPTION">the "s" option</a> is specified,
  *           it matches any character including the above four characters.
  *
- *       <dt class="REGEX"><Kbd>\e \f \n \r \t</kbd>
+ *       <dt class="REGEX">\e \f \n \r \t
  *       <dd>Matches ESCAPE (U+001B), FORM FEED (U+000C), LINE FEED (U+000A),
  *           CARRIAGE RETURN (U+000D), HORIZONTAL TABULATION (U+0009)
  *
- *       <dt class="REGEX"><kbd>\c</kbd><var>C</var>
+ *       <dt class="REGEX">\c<var>C</var>
  *       <dd>Matches a control character.
- *           The <var>C</var> must be one of '<kbd>@</kbd>', '<kbd>A</kbd>'-'<kbd>Z</kbd>',
- *           '<kbd>[</kbd>', '<kbd>\u005c</kbd>', '<kbd>]</kbd>', '<kbd>^</kbd>', '<kbd>_</kbd>'.
+ *           The <var>C</var> must be one of '@', 'A'-'Z',
+ *           '[', '\u005c', ']', '^', '_'.
  *           It matches a control character of which the character code is less than
  *           the character code of the <var>C</var> by 0x0040.
- *       <dd class="REGEX">For example, a <kbd>\cJ</kbd> matches a LINE FEED (U+000A),
- *           and a <kbd>\c[</kbd> matches an ESCAPE (U+001B).
+ *       <dd class="REGEX">For example, a \cJ matches a LINE FEED (U+000A),
+ *           and a \c[ matches an ESCAPE (U+001B).
  *
  *       <dt class="REGEX">a non-meta character
  *       <dd>Matches the character.
  *
- *       <dt class="REGEX"><KBD>\</KBD> + a meta character
+ *       <dt class="REGEX">\ + a meta character
  *       <dd>Matches the meta character.
  *
- *       <dt class="REGEX"><kbd>\u005cx</kbd><var>HH</var> <kbd>\u005cx{</kbd><var>HHHH</var><kbd>}</kbd>
+ *       <dt class="REGEX">\u005cx<var>HH</var> \u005cx{<var>HHHH</var>}
  *       <dd>Matches a character of which code point is <var>HH</var> (Hexadecimal) in Unicode.
- *           You can write just 2 digits for <kbd>\u005cx</kbd><var>HH</var>, and
- *           variable length digits for <kbd>\u005cx{</kbd><var>HHHH</var><kbd>}</kbd>.
+ *           You can write just 2 digits for \u005cx<var>HH</var>, and
+ *           variable length digits for \u005cx{<var>HHHH</var>}.
  *
  *       <!--
- *       <dt class="REGEX"><kbd>\u005c u</kbd><var>HHHH</var>
+ *       <dt class="REGEX">\u005c u<var>HHHH</var>
  *       <dd>Matches a character of which code point is <var>HHHH</var> (Hexadecimal) in Unicode.
  *       -->
  *
- *       <dt class="REGEX"><kbd>\u005cv</kbd><var>HHHHHH</var>
+ *       <dt class="REGEX">\u005cv<var>HHHHHH</var>
  *       <dd>Matches a character of which code point is <var>HHHHHH</var> (Hexadecimal) in Unicode.
  *
- *       <dt class="REGEX"><kbd>\g</kbd>
+ *       <dt class="REGEX">\g
  *       <dd>Matches a grapheme.
- *       <dd class="REGEX">It is equivalent to <kbd>(?[\p{ASSIGNED}]-[\p{M}\p{C}])?(?:\p{M}|[\x{094D}\x{09CD}\x{0A4D}\x{0ACD}\x{0B3D}\x{0BCD}\x{0C4D}\x{0CCD}\x{0D4D}\x{0E3A}\x{0F84}]\p{L}|[\x{1160}-\x{11A7}]|[\x{11A8}-\x{11FF}]|[\x{FF9E}\x{FF9F}])*</kbd>
+ *       <dd class="REGEX">It is equivalent to (?[\p{ASSIGNED}]-[\p{M}\p{C}])?(?:\p{M}|[\x{094D}\x{09CD}\x{0A4D}\x{0ACD}\x{0B3D}\x{0BCD}\x{0C4D}\x{0CCD}\x{0D4D}\x{0E3A}\x{0F84}]\p{L}|[\x{1160}-\x{11A7}]|[\x{11A8}-\x{11FF}]|[\x{FF9E}\x{FF9F}])*
  *
- *       <dt class="REGEX"><kbd>\X</kbd>
+ *       <dt class="REGEX">\X
  *       <dd class="REGEX">Matches a combining character sequence.
- *       It is equivalent to <kbd>(?:\PM\pM*)</kbd>
+ *       It is equivalent to (?:\PM\pM*)
  *     </dl>
  *   </li>
  *
  *   <li>Character class
  *     <dl>
- + *       <dt class="REGEX"><kbd>[</kbd><var>R<sub>1</sub></var><var>R<sub>2</sub></var><var>...</var><var>R<sub>n</sub></var><kbd>]</kbd> (without <a href="#COMMA_OPTION">"," option</a>)
- + *       <dt class="REGEX"><kbd>[</kbd><var>R<sub>1</sub></var><kbd>,</kbd><var>R<sub>2</sub></var><kbd>,</kbd><var>...</var><kbd>,</kbd><var>R<sub>n</sub></var><kbd>]</kbd> (with <a href="#COMMA_OPTION">"," option</a>)
+ *       <dt class="REGEX">[<var>R<sub>1</sub></var><var>R<sub>2</sub></var><var>...</var><var>R<sub>n</sub></var>] (without <a href="#COMMA_OPTION">"," option</a>)
+ *       <dt class="REGEX">[<var>R<sub>1</sub></var>,<var>R<sub>2</sub></var>,<var>...</var>,<var>R<sub>n</sub></var>] (with <a href="#COMMA_OPTION">"," option</a>)
  *       <dd>Positive character class.  It matches a character in ranges.
  *       <dd><var>R<sub>n</sub></var>:
  *       <ul>
- *         <li class="REGEX">A character (including <Kbd>\e \f \n \r \t</kbd> <kbd>\u005cx</kbd><var>HH</var> <kbd>\u005cx{</kbd><var>HHHH</var><kbd>}</kbd> <!--kbd>\u005c u</kbd><var>HHHH</var--> <kbd>\u005cv</kbd><var>HHHHHH</var>)
+ *         <li class="REGEX">A character (including \e \f \n \r \t \u005cx<var>HH</var> \u005cx{<var>HHHH</var>} \u005cv<var>HHHHHH</var>)
  *             <p>This range matches the character.
- *         <li class="REGEX"><var>C<sub>1</sub></var><kbd>-</kbd><var>C<sub>2</sub></var>
+ *         <li class="REGEX"><var>C<sub>1</sub></var>-<var>C<sub>2</sub></var>
  *             <p>This range matches a character which has a code point that is >= <var>C<sub>1</sub></var>'s code point and &lt;= <var>C<sub>2</sub></var>'s code point.
- + *         <li class="REGEX">A POSIX character class: <Kbd>[:alpha:] [:alnum:] [:ascii:] [:cntrl:] [:digit:] [:graph:] [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:]</kbd>,
- + *             and negative POSIX character classes in Perl like <kbd>[:^alpha:]</kbd>
+ *         <li class="REGEX">A POSIX character class: [:alpha:] [:alnum:] [:ascii:] [:cntrl:] [:digit:] [:graph:] [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:],
+ *             and negative POSIX character classes in Perl like [:^alpha:]
  *             <p>...
- *         <li class="REGEX"><kbd>\d \D \s \S \w \W \p{</kbd><var>name</var><kbd>} \P{</kbd><var>name</var><kbd>}</kbd>
+ *         <li class="REGEX">\d \D \s \S \w \W \p{<var>name</var>} \P{<var>name</var>}
  *             <p>These expressions specifies the same ranges as the following expressions.
  *       </ul>
  *       <p class="REGEX">Enumerated ranges are merged (union operation).
- *          <kbd>[a-ec-z]</kbd> is equivalent to <kbd>[a-z]</kbd>
+ *          [a-ec-z] is equivalent to [a-z]
  *
- *       <dt class="REGEX"><kbd>[^</kbd><var>R<sub>1</sub></var><var>R<sub>2</sub></var><var>...</var><var>R<sub>n</sub></var><kbd>]</kbd> (without a <a href="#COMMA_OPTION">"," option</a>)
- *       <dt class="REGEX"><kbd>[^</kbd><var>R<sub>1</sub></var><kbd>,</kbd><var>R<sub>2</sub></var><kbd>,</kbd><var>...</var><kbd>,</kbd><var>R<sub>n</sub></var><kbd>]</kbd> (with a <a href="#COMMA_OPTION">"," option</a>)
+ *       <dt class="REGEX">[^<var>R<sub>1</sub></var><var>R<sub>2</sub></var><var>...</var><var>R<sub>n</sub></var>] (without a <a href="#COMMA_OPTION">"," option</a>)
+ *       <dt class="REGEX">[^<var>R<sub>1</sub></var>,<var>R<sub>2</sub></var>,<var>...</var>,<var>R<sub>n</sub></var>] (with a <a href="#COMMA_OPTION">"," option</a>)
  *       <dd>Negative character class.  It matches a character not in ranges.
  *
- *       <dt class="REGEX"><kbd>(?[</kbd><var>ranges</var><kbd>]</kbd><var>op</var><kbd>[</kbd><var>ranges</var><kbd>]</kbd><var>op</var><kbd>[</kbd><var>ranges</var><kbd>]</kbd> ... <Kbd>)</kbd>
- *       (<var>op</var> is <kbd>-</kbd> or <kbd>+</kbd> or <kbd>&</kbd>.)
+ *       <dt class="REGEX">(?[<var>ranges</var>]<var>op</var>[<var>ranges</var>]<var>op</var>[<var>ranges</var>] ... )
+ *       (<var>op</var> is - or + or &amp;.)
  *       <dd>Subtraction or union or intersection for character classes.
- *       <dd class="REGEX">For exmaple, <kbd>(?[A-Z]-[CF])</kbd> is equivalent to <kbd>[A-BD-EG-Z]</kbd>, and <kbd>(?[0x00-0x7f]-[K]&[\p{Lu}])</kbd> is equivalent to <kbd>[A-JL-Z]</kbd>.
+ *       <dd class="REGEX">For example, (?[A-Z]-[CF]) is equivalent to [A-BD-EG-Z], and (?[0x00-0x7f]-[K]&amp;[\p{Lu}]) is equivalent to [A-JL-Z].
  *       <dd>The result of this operations is a <u>positive character class</u>
  *           even if an expression includes any negative character classes.
  *           You have to take care on this in case-insensitive matching.
- *           For instance, <kbd>(?[^b])</kbd> is equivalent to <kbd>[\x00-ac-\x{10ffff}]</kbd>,
- *           which is equivalent to <kbd>[^b]</kbd> in case-sensitive matching.
- *           But, in case-insensitive matching, <kbd>(?[^b])</kbd> matches any character because
- *           it includes '<kbd>B</kbd>' and '<kbd>B</kbd>' matches '<kbd>b</kbd>'
- *           though <kbd>[^b]</kbd> is processed as <kbd>[^Bb]</kbd>.
+ *           For instance, (?[^b]) is equivalent to [\x00-ac-\x{10ffff}],
+ *           which is equivalent to [^b] in case-sensitive matching.
+ *           But, in case-insensitive matching, (?[^b]) matches any character because
+ *           it includes 'B' and 'B' matches 'b'
+ *           though [^b] is processed as [^Bb].
  *
- *       <dt class="REGEX"><kbd>[</kbd><var>R<sub>1</sub>R<sub>2</sub>...</var><kbd>-[</kbd><var>R<sub>n</sub>R<sub>n+1</sub>...</var><kbd>]]</kbd> (with an <a href="#X_OPTION">"X" option</a>)</dt>
+ *       <dt class="REGEX">[<var>R<sub>1</sub>R<sub>2</sub>...</var>-[<var>R<sub>n</sub>R<sub>n+1</sub>...</var>]] (with an <a href="#X_OPTION">"X" option</a>)</dt>
  *       <dd>Character class subtraction for the XML Schema.
  *           You can use this syntax when you specify an <a href="#X_OPTION">"X" option</a>.
  *
- *       <dt class="REGEX"><kbd>\d</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[0-9]</kbd>.
+ *       <dt class="REGEX">\d
+ *       <dd class="REGEX">Equivalent to [0-9].
  *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>\p{Nd}</kbd></span>.
+ *           <span class="REGEX">\p{Nd}</span>.
  *
- *       <dt class="REGEX"><kbd>\D</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[^0-9]</kbd>
+ *       <dt class="REGEX">\D
+ *       <dd class="REGEX">Equivalent to [^0-9]
  *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>\P{Nd}</kbd></span>.
+ *           <span class="REGEX">\P{Nd}</span>.
  *
- *       <dt class="REGEX"><kbd>\s</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[ \f\n\r\t]</kbd>
+ *       <dt class="REGEX">\s
+ *       <dd class="REGEX">Equivalent to [ \f\n\r\t]
  *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[ \f\n\r\t\p{Z}]</kbd></span>.
+ *           <span class="REGEX">[ \f\n\r\t\p{Z}]</span>.
  *
- *       <dt class="REGEX"><kbd>\S</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[^ \f\n\r\t]</kbd>
+ *       <dt class="REGEX">\S
+ *       <dd class="REGEX">Equivalent to [^ \f\n\r\t]
  *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[^ \f\n\r\t\p{Z}]</kbd></span>.
+ *           <span class="REGEX">[^ \f\n\r\t\p{Z}]</span>.
  *
- *       <dt class="REGEX"><kbd>\w</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[a-zA-Z0-9_]</kbd>
+ *       <dt class="REGEX">\w
+ *       <dd class="REGEX">Equivalent to [a-zA-Z0-9_]
  *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[\p{Lu}\p{Ll}\p{Lo}\p{Nd}_]</kbd></span>.
+ *           <span class="REGEX">[\p{Lu}\p{Ll}\p{Lo}\p{Nd}_]</span>.
  *
- *       <dt class="REGEX"><kbd>\W</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[^a-zA-Z0-9_]</kbd>
+ *       <dt class="REGEX">\W
+ *       <dd class="REGEX">Equivalent to [^a-zA-Z0-9_]
  *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[^\p{Lu}\p{Ll}\p{Lo}\p{Nd}_]</kbd></span>.
+ *           <span class="REGEX">[^\p{Lu}\p{Ll}\p{Lo}\p{Nd}_]</span>.
  *
- *       <dt class="REGEX"><kbd>\p{</kbd><var>name</var><kbd>}</kbd>
- *       <dd>Matches one character in the specified General Category (the second field in <a href="ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt"><kbd>UnicodeData.txt</kbd></a>) or the specified <a href="ftp://ftp.unicode.org/Public/UNIDATA/Blocks.txt">Block</a>.
+ *       <dt class="REGEX">\p{<var>name</var>}
+ *       <dd>Matches one character in the specified General Category (the second field in <a href="ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt">UnicodeData.txt</a>) or the specified <a href="ftp://ftp.unicode.org/Public/UNIDATA/Blocks.txt">Block</a>.
  *       The following names are available:
  *       <dl>
  *         <dt>Unicode General Categories:
- *         <dd><kbd>
+ *         <dd>
  *       L, M, N, Z, C, P, S, Lu, Ll, Lt, Lm, Lo, Mn, Me, Mc, Nd, Nl, No, Zs, Zl, Zp,
  *       Cc, Cf, Cn, Co, Cs, Pd, Ps, Pe, Pc, Po, Sm, Sc, Sk, So,
- *         </kbd>
  *         <dd>(Currently the Cn category includes U+10000-U+10FFFF characters)
  *         <dt>Unicode Blocks:
- *         <dd><kbd>
+ *         <dd>
  *       Basic Latin, Latin-1 Supplement, Latin Extended-A, Latin Extended-B,
  *       IPA Extensions, Spacing Modifier Letters, Combining Diacritical Marks, Greek,
  *       Cyrillic, Armenian, Hebrew, Arabic, Devanagari, Bengali, Gurmukhi, Gujarati,
@@ -259,91 +252,89 @@ import java.util.Stack;
  *       Arabic Presentation Forms-A, Combining Half Marks, CJK Compatibility Forms,
  *       Small Form Variants, Arabic Presentation Forms-B, Specials,
  *       Halfwidth and Fullwidth Forms
- *         </kbd>
  *         <dt>Others:
- *         <dd><kbd>ALL</kbd> (Equivalent to <kbd>[\u005cu0000-\u005cv10FFFF]</kbd>)
- *         <dd><kbd>ASSGINED</kbd> (<kbd>\p{ASSIGNED}</kbd> is equivalent to <kbd>\P{Cn}</kbd>)
- *         <dd><kbd>UNASSGINED</kbd>
- *             (<kbd>\p{UNASSIGNED}</kbd> is equivalent to <kbd>\p{Cn}</kbd>)
+ *         <dd>ALL (Equivalent to [\u005cu0000-\u005cv10FFFF])
+ *         <dd>ASSGINED (\p{ASSIGNED} is equivalent to \P{Cn})
+ *         <dd>UNASSGINED
+ *             (\p{UNASSIGNED} is equivalent to \p{Cn})
  *       </dl>
  *
- *       <dt class="REGEX"><kbd>\P{</kbd><var>name</var><kbd>}</kbd>
+ *       <dt class="REGEX">\P{<var>name</var>}
  *       <dd>Matches one character not in the specified General Category or the specified Block.
  *     </dl>
  *   </li>
  *
  *   <li>Selection and Quantifier
  *     <dl>
- *       <dt class="REGEX"><VAR>X</VAR><kbd>|</kbd><VAR>Y</VAR>
+ *       <dt class="REGEX"><VAR>X</VAR>|<VAR>Y</VAR>
  *       <dd>...
  *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>*</KBD>
+ *       <dt class="REGEX"><VAR>X</VAR>*
  *       <dd>Matches 0 or more <var>X</var>.
  *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>+</KBD>
+ *       <dt class="REGEX"><VAR>X</VAR>+
  *       <dd>Matches 1 or more <var>X</var>.
  *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>?</KBD>
+ *       <dt class="REGEX"><VAR>X</VAR>?
  *       <dd>Matches 0 or 1 <var>X</var>.
  *
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>number</var><kbd>}</kbd>
+ *       <dt class="REGEX"><var>X</var>{<var>number</var>}
  *       <dd>Matches <var>number</var> times.
  *
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,}</kbd>
+ *       <dt class="REGEX"><var>X</var>{<var>min</var>,}
  *       <dd>...
  *
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,</kbd><var>max</var><kbd>}</kbd>
+ *       <dt class="REGEX"><var>X</var>{<var>min</var>,<var>max</var>}
  *       <dd>...
  *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>*?</kbd>
- *       <dt class="REGEX"><VAR>X</VAR><kbd>+?</kbd>
- *       <dt class="REGEX"><VAR>X</VAR><kbd>??</kbd>
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,}?</kbd>
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,</kbd><var>max</var><kbd>}?</kbd>
+ *       <dt class="REGEX"><VAR>X</VAR>*?
+ *       <dt class="REGEX"><VAR>X</VAR>+?
+ *       <dt class="REGEX"><VAR>X</VAR>??
+ *       <dt class="REGEX"><var>X</var>{<var>min</var>,}?
+ *       <dt class="REGEX"><var>X</var>{<var>min</var>,<var>max</var>}?
  *       <dd>Non-greedy matching.
  *     </dl>
  *   </li>
  *
  *   <li>Grouping, Capturing, and Back-reference
  *     <dl>
- *       <dt class="REGEX"><KBD>(?:</kbd><VAR>X</VAR><kbd>)</KBD>
- *       <dd>Grouping. "<KBD>foo+</KBD>" matches "<KBD>foo</KBD>" or "<KBD>foooo</KBD>".
- *       If you want it matches "<KBD>foofoo</KBD>" or "<KBD>foofoofoo</KBD>",
- *       you have to write "<KBD>(?:foo)+</KBD>".
+ *       <dt class="REGEX">(?:<VAR>X</VAR>)
+ *       <dd>Grouping. "foo+" matches "foo" or "foooo".
+ *       If you want it matches "foofoo" or "foofoofoo",
+ *       you have to write "(?:foo)+".
  *
- *       <dt class="REGEX"><KBD>(</kbd><VAR>X</VAR><kbd>)</KBD>
+ *       <dt class="REGEX">(<VAR>X</VAR>)
  *       <dd>Grouping with capturing.
  * It make a group and applications can know
  * where in target text a group matched with methods of a <code>Match</code> instance
- * after <code><a href="#matches(java.lang.String, org.apache.xerces.utils.regex.Match)">matches(String,Match)</a></code>.
+ * after {@link #matches(String, Match)}.
  * The 0th group means whole of this regular expression.
  * The <VAR>N</VAR>th gorup is the inside of the <VAR>N</VAR>th left parenthesis.
  *
  *   <p>For instance, a regular expression is
- *   "<FONT color=blue><KBD> *([^&lt;:]*) +&lt;([^&gt;]*)&gt; *</KBD></FONT>"
+ *   "<span style="color:blue"> *([^&lt;:]*) +&lt;([^&gt;]*)&gt; *</span>"
  *   and target text is
- *   "<FONT color=red><KBD>From: TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;</KBD></FONT>":
+ *   "<span style="color:red">From: TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;</span>":
  *   <ul>
  *     <li><code>Match.getCapturedText(0)</code>:
- *     "<FONT color=red><KBD> TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;</KBD></FONT>"
- *     <li><code>Match.getCapturedText(1)</code>: "<FONT color=red><KBD>TAMURA Kent</KBD></FONT>"
- *     <li><code>Match.getCapturedText(2)</code>: "<FONT color=red><KBD>kent@trl.ibm.co.jp</KBD></FONT>"
+ *     "<span style="color:red"> TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;</span>"
+ *     <li><code>Match.getCapturedText(1)</code>: "<span style="color:red">TAMURA Kent</span>"
+ *     <li><code>Match.getCapturedText(2)</code>: "<span style="color:red">kent@trl.ibm.co.jp</span>"
  *   </ul>
  *
- *       <dt class="REGEX"><kbd>\1 \2 \3 \4 \5 \6 \7 \8 \9</kbd>
- *       <dd>
+ *       <dt class="REGEX">\1 \2 \3 \4 \5 \6 \7 \8 \9
  *
- *       <dt class="REGEX"><kbd>(?></kbd><var>X</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?><var>X</var>)
  *       <dd>Independent expression group. ................
  *
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>:</kbd><var>X</var><kbd>)</kbd>
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>-</kbd><var>options2</var><kbd>:</kbd><var>X</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?<var>options</var>:<var>X</var>)
+ *       <dt class="REGEX">(?<var>options</var>-<var>options2</var>:<var>X</var>)
  *       <dd>............................
  *       <dd>The <var>options</var> or the <var>options2</var> consists of 'i' 'm' 's' 'w'.
  *           Note that it can not contain 'u'.
  *
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>)</kbd>
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>-</kbd><var>options2</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?<var>options</var>)
+ *       <dt class="REGEX">(?<var>options</var>-<var>options2</var>)
  *       <dd>......
  *       <dd>These expressions must be at the beginning of a group.
  *     </dl>
@@ -351,78 +342,78 @@ import java.util.Stack;
  *
  *   <li>Anchor
  *     <dl>
- *       <dt class="REGEX"><kbd>\A</kbd>
+ *       <dt class="REGEX">\A
  *       <dd>Matches the beginnig of the text.
  *
- *       <dt class="REGEX"><kbd>\Z</kbd>
+ *       <dt class="REGEX">\Z
  *       <dd>Matches the end of the text, or before an EOL character at the end of the text,
  *           or CARRIAGE RETURN + LINE FEED at the end of the text.
  *
- *       <dt class="REGEX"><kbd>\z</kbd>
+ *       <dt class="REGEX">\z
  *       <dd>Matches the end of the text.
  *
- *       <dt class="REGEX"><kbd>^</kbd>
- *       <dd>Matches the beginning of the text.  It is equivalent to <span class="REGEX"><Kbd>\A</kbd></span>.
+ *       <dt class="REGEX">^
+ *       <dd>Matches the beginning of the text.  It is equivalent to <span class="REGEX">\A</span>.
  *       <dd>When <a href="#M_OPTION">a "m" option</a> is set,
  *           it matches the beginning of the text, or after one of EOL characters (
  *           LINE FEED (U+000A), CARRIAGE RETURN (U+000D), LINE SEPARATOR (U+2028),
  *           PARAGRAPH SEPARATOR (U+2029).)
  *
- *       <dt class="REGEX"><kbd>$</kbd>
+ *       <dt class="REGEX">$
  *       <dd>Matches the end of the text, or before an EOL character at the end of the text,
  *           or CARRIAGE RETURN + LINE FEED at the end of the text.
  *       <dd>When <a href="#M_OPTION">a "m" option</a> is set,
  *           it matches the end of the text, or before an EOL character.
  *
- *       <dt class="REGEX"><kbd>\b</kbd>
+ *       <dt class="REGEX">\b
  *       <dd>Matches word boundary.
  *           (See <a href="#W_OPTION">a "w" option</a>)
  *
- *       <dt class="REGEX"><kbd>\B</kbd>
+ *       <dt class="REGEX">\B
  *       <dd>Matches non word boundary.
  *           (See <a href="#W_OPTION">a "w" option</a>)
  *
- *       <dt class="REGEX"><kbd>\&lt;</kbd>
+ *       <dt class="REGEX">\&lt;
  *       <dd>Matches the beginning of a word.
  *           (See <a href="#W_OPTION">a "w" option</a>)
  *
- *       <dt class="REGEX"><kbd>\&gt;</kbd>
+ *       <dt class="REGEX">\&gt;
  *       <dd>Matches the end of a word.
  *           (See <a href="#W_OPTION">a "w" option</a>)
  *     </dl>
  *   </li>
  *   <li>Lookahead and lookbehind
  *     <dl>
- *       <dt class="REGEX"><kbd>(?=</kbd><var>X</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?=<var>X</var>)
  *       <dd>Lookahead.
  *
- *       <dt class="REGEX"><kbd>(?!</kbd><var>X</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?!<var>X</var>)
  *       <dd>Negative lookahead.
  *
- *       <dt class="REGEX"><kbd>(?&lt;=</kbd><var>X</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?&lt;=<var>X</var>)
  *       <dd>Lookbehind.
  *       <dd>(Note for text capturing......)
  *
- *       <dt class="REGEX"><kbd>(?&lt;!</kbd><var>X</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?&lt;!<var>X</var>)
  *       <dd>Negative lookbehind.
  *     </dl>
  *   </li>
  *
  *   <li>Misc.
  *     <dl>
- *       <dt class="REGEX"><kbd>(?(</Kbd><var>condition</var><Kbd>)</kbd><var>yes-pattern</var><kbd>|</kbd><var>no-pattern</var><kbd>)</kbd>,
- *       <dt class="REGEX"><kbd>(?(</kbd><var>condition</var><kbd>)</kbd><var>yes-pattern</var><kbd>)</kbd>
+ *       <dt class="REGEX">(?(<var>condition</var>)<var>yes-pattern</var>|<var>no-pattern</var>),
+ *       <dt class="REGEX">(?(<var>condition</var>)<var>yes-pattern</var>)
  *       <dd>......
- *       <dt class="REGEX"><kbd>(?#</kbd><var>comment</var><kbd>)</kbd>
- *       <dd>Comment.  A comment string consists of characters except '<kbd>)</kbd>'.
+ *       <dt class="REGEX">(?#<var>comment</var>)
+ *       <dd>Comment.  A comment string consists of characters except ')'.
  *           You can not write comments in character classes and before quantifiers.
  *     </dl>
  *   </li>
  * </ul>
  *
  *
- * <hr width="50%">
- * <h3>BNF for the regular expression</h3>
+ * <hr>
+ * <h2>BNF for the regular expression</h2>
  * <pre>
  * regex ::= ('(?' options ')')? term ('|' term)*
  * term ::= factor+
@@ -452,7 +443,7 @@ import java.util.Stack;
  * character-1 ::= (any character except meta-characters)
  *
  * char-class ::= '[' ranges ']'
- *                | '(?[' ranges ']' ([-+&] '[' ranges ']')? ')'
+ *                | '(?[' ranges ']' ([-+&amp;] '[' ranges ']')? ')'
  * ranges ::= '^'? (range <a href="#COMMA_OPTION">','?</a>)+
  * range ::= '\d' | '\w' | '\s' | '\D' | '\W' | '\S' | category-block
  *           | range-char | range-char '-' range-char
@@ -465,8 +456,8 @@ import java.util.Stack;
  * character-2 ::= (any character except \[]-,)
  * </pre>
  *
- * <hr width="50%">
- * <h3>TODO</h3>
+ * <hr>
+ * <h2>TODO</h2>
  * <ul>
  *   <li><a href="http://www.unicode.org/unicode/reports/tr18/">Unicode Regular Expression Guidelines</a>
  *     <ul>
@@ -475,13 +466,6 @@ import java.util.Stack;
  *     </ul>
  *   <li>Parsing performance
  * </ul>
- *
- * <hr width="50%">
- *
- * @xerces.internal
- *
- * @author TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;
- * @version $Id$
  */
 public class RegularExpression implements java.io.Serializable {
 
@@ -1757,15 +1741,15 @@ public class RegularExpression implement
             this.target = target;
         }
 
-        final void resetTarget(String target) {
+        void resetTarget(String target) {
             this.target = target;
         }
 
-        final char charAt(int index) {
+        char charAt(int index) {
             return target.charAt(index);
         }
 
-        final boolean regionMatches(boolean ignoreCase, int offset, int limit,
+        boolean regionMatches(boolean ignoreCase, int offset, int limit,
                                     String part, int partlen) {
             if (limit-offset < partlen) {
                 return false;
@@ -1773,7 +1757,7 @@ public class RegularExpression implement
             return (ignoreCase) ? target.regionMatches(true, offset, part, 0, partlen) : target.regionMatches(offset, part, 0, partlen);
         }
 
-        final boolean regionMatches(boolean ignoreCase, int offset, int limit,
+        boolean regionMatches(boolean ignoreCase, int offset, int limit,
                                     int offset2, int partlen) {
             if (limit-offset < partlen) {
                 return false;
@@ -1791,7 +1775,7 @@ public class RegularExpression implement
             this.target = target;
         }
 
-        final void resetTarget(char[] target) {
+        void resetTarget(char[] target) {
             this.target = target;
         }
 
@@ -1799,7 +1783,7 @@ public class RegularExpression implement
             return target[index];
         }
 
-        final boolean regionMatches(boolean ignoreCase, int offset, int limit,
+        boolean regionMatches(boolean ignoreCase, int offset, int limit,
                                     String part, int partlen) {
             if (offset < 0 || limit-offset < partlen)  {
                 return false;
@@ -1808,7 +1792,7 @@ public class RegularExpression implement
                     : regionMatches(offset, limit, part, partlen);
         }
 
-        private final boolean regionMatches(int offset, int limit, String part, int partlen) {
+        private boolean regionMatches(int offset, int limit, String part, int partlen) {
             int i = 0;
             while (partlen-- > 0) {
                 if (target[offset++] != part.charAt(i++)) {
@@ -1818,7 +1802,7 @@ public class RegularExpression implement
             return true;
         }
 
-        private final boolean regionMatchesIgnoreCase(int offset, int limit, String part, int partlen) {
+        private boolean regionMatchesIgnoreCase(int offset, int limit, String part, int partlen) {
             int i = 0;
             while (partlen-- > 0) {
                 final char ch1 = target[offset++] ;
@@ -1838,7 +1822,7 @@ public class RegularExpression implement
             return true;
         }
 
-        final boolean regionMatches(boolean ignoreCase, int offset, int limit, int offset2, int partlen) {
+        boolean regionMatches(boolean ignoreCase, int offset, int limit, int offset2, int partlen) {
             if (offset < 0 || limit-offset < partlen) {
                 return false;
             }
@@ -1846,7 +1830,7 @@ public class RegularExpression implement
                     : regionMatches(offset, limit, offset2, partlen);
         }
 
-        private final boolean regionMatches(int offset, int limit, int offset2, int partlen) {
+        private boolean regionMatches(int offset, int limit, int offset2, int partlen) {
             int i = offset2;
             while (partlen-- > 0) {
                 if ( target [  offset++ ]  !=  target [  i++ ] )
@@ -1855,7 +1839,7 @@ public class RegularExpression implement
             return true;
         }
 
-        private final boolean regionMatchesIgnoreCase(int offset, int limit, int offset2, int partlen) {
+        private boolean regionMatchesIgnoreCase(int offset, int limit, int offset2, int partlen) {
             int i = offset2;
             while (partlen-- > 0) {
                 final char ch1 =  target[offset++] ;
@@ -1883,15 +1867,15 @@ public class RegularExpression implement
             this.target = target;
         }
 
-        final void resetTarget(CharacterIterator target) {
+        void resetTarget(CharacterIterator target) {
             this.target = target;
         }
 
-        final char charAt(int index) {
+        char charAt(int index) {
             return target.setIndex(index);
         }
 
-        final boolean regionMatches(boolean ignoreCase, int offset, int limit,
+        boolean regionMatches(boolean ignoreCase, int offset, int limit,
                                     String part, int partlen) {
             if (offset < 0 || limit-offset < partlen)  {
                 return false;
@@ -1900,7 +1884,7 @@ public class RegularExpression implement
                     : regionMatches(offset, limit, part, partlen);
         }
 
-        private final boolean regionMatches(int offset, int limit, String part, int partlen) {
+        private boolean regionMatches(int offset, int limit, String part, int partlen) {
             int i = 0;
             while (partlen-- > 0) {
                 if (target.setIndex(offset++) != part.charAt(i++)) {
@@ -1910,7 +1894,7 @@ public class RegularExpression implement
             return true;
         }
 
-        private final boolean regionMatchesIgnoreCase(int offset, int limit, String part, int partlen) {
+        private boolean regionMatchesIgnoreCase(int offset, int limit, String part, int partlen) {
             int i = 0;
             while (partlen-- > 0) {
                 final char ch1 = target.setIndex(offset++) ;
@@ -1930,7 +1914,7 @@ public class RegularExpression implement
             return true;
         }
 
-        final boolean regionMatches(boolean ignoreCase, int offset, int limit, int offset2, int partlen) {
+        boolean regionMatches(boolean ignoreCase, int offset, int limit, int offset2, int partlen) {
             if (offset < 0 || limit-offset < partlen) {
                 return false;
             }
@@ -1938,7 +1922,7 @@ public class RegularExpression implement
                     : regionMatches(offset, limit, offset2, partlen);
         }
 
-        private final boolean regionMatches(int offset, int limit, int offset2, int partlen) {
+        private boolean regionMatches(int offset, int limit, int offset2, int partlen) {
             int i = offset2;
             while (partlen-- > 0) {
                 if (target.setIndex(offset++) != target.setIndex(i++)) {
@@ -1948,7 +1932,7 @@ public class RegularExpression implement
             return true;
         }
 
-        private final boolean regionMatchesIgnoreCase(int offset, int limit, int offset2, int partlen) {
+        private boolean regionMatchesIgnoreCase(int offset, int limit, int offset2, int partlen) {
             int i = offset2;
             while (partlen-- > 0) {
                 final char ch1 = target.setIndex(offset++) ;
@@ -2154,17 +2138,6 @@ public class RegularExpression implement
     }
 
     /**
-     * An option.
-     * If you specify this option, <span class="REGEX"><kbd>(</kbd><var>X</var><kbd>)</kbd></span>
-     * captures matched text, and <span class="REGEX"><kbd>(:?</kbd><var>X</var><kbd>)</kbd></span>
-     * does not capture.
-     *
-     * @see #RegularExpression(java.lang.String,int)
-     * @see #setPattern(java.lang.String,int)
-    static final int MARK_PARENS = 1<<0;
-     */
-
-    /**
      * "i"
      */
     static final int IGNORE_CASE = 1<<1;
@@ -2185,25 +2158,25 @@ public class RegularExpression implement
     static final int EXTENDED_COMMENT = 1<<4;
 
     /**
-     * This option redefines <span class="REGEX"><kbd>\d \D \w \W \s \S</kbd></span>.
+     * This option redefines <span class="REGEX">\d \D \w \W \s \S</span>.
      *
-     * @see #RegularExpression(java.lang.String,int)
-     * @see #setPattern(java.lang.String,int)
+     * @see #RegularExpression(java.lang.String,java.lang.String)
+     * @see #setPattern(java.lang.String,java.lang.String)
      * @see #UNICODE_WORD_BOUNDARY
      */
     static final int USE_UNICODE_CATEGORY = 1<<5; // "u"
 
     /**
      * An option.
-     * This enables to process locale-independent word boundary for <span class="REGEX"><kbd>\b \B \&lt; \></kbd></span>.
+     * This enables to process locale-independent word boundary for <span class="REGEX">\b \B \&lt; \></span>.
      * <p>By default, the engine considers a position between a word character
-     * (<span class="REGEX"><Kbd>\w</kbd></span>) and a non word character
+     * (<span class="REGEX">\w</span>) and a non word character
      * is a word boundary.
      * <p>By this option, the engine checks word boundaries with the method of
      * 'Unicode Regular Expression Guidelines' Revision 4.
      *
-     * @see #RegularExpression(java.lang.String,int)
-     * @see #setPattern(java.lang.String,int)
+     * @see #RegularExpression(java.lang.String,java.lang.String)
+     * @see #setPattern(java.lang.String,java.lang.String)
      */
     static final int UNICODE_WORD_BOUNDARY = 1<<6; // "w"
 
@@ -2225,7 +2198,7 @@ public class RegularExpression implement
     static final int SPECIAL_COMMA = 1<<10;
 
 
-    private static final boolean isSet(int options, int flag) {
+    private static boolean isSet(int options, int flag) {
         return (options & flag) == flag;
     }
 
@@ -2233,7 +2206,7 @@ public class RegularExpression implement
      * Creates a new RegularExpression instance.
      *
      * @param regex A regular expression
-     * @exception org.apache.xerces.utils.regex.ParseException <VAR>regex</VAR> is not conforming to the syntax.
+     * @exception ParseException <VAR>regex</VAR> is not conforming to the syntax.
      */
     public RegularExpression(String regex) throws ParseException {
         this(regex, null);
@@ -2244,7 +2217,7 @@ public class RegularExpression implement
      *
      * @param regex A regular expression
      * @param options A String consisted of "i" "m" "s" "u" "w" "," "X"
-     * @exception org.apache.xerces.utils.regex.ParseException <VAR>regex</VAR> is not conforming to the syntax.
+     * @exception ParseException <VAR>regex</VAR> is not conforming to the syntax.
      */
     public RegularExpression(String regex, String options) throws ParseException {
         this.setPattern(regex, options);
@@ -2255,7 +2228,7 @@ public class RegularExpression implement
      *
      * @param regex A regular expression
      * @param options A String consisted of "i" "m" "s" "u" "w" "," "X"
-     * @exception org.apache.xerces.utils.regex.ParseException <VAR>regex</VAR> is not conforming to the syntax.
+     * @exception ParseException <VAR>regex</VAR> is not conforming to the syntax.
      */
     public RegularExpression(String regex, String options, Locale locale) throws ParseException {
         this.setPattern(regex, options, locale);
@@ -2365,7 +2338,7 @@ public class RegularExpression implement
     private static final int WT_IGNORE = 0;
     private static final int WT_LETTER = 1;
     private static final int WT_OTHER = 2;
-    private static final int getWordType0(char ch, int opts) {
+    private static int getWordType0(char ch, int opts) {
         if (!isSet(opts, UNICODE_WORD_BOUNDARY)) {
             if (isSet(opts, USE_UNICODE_CATEGORY)) {
                 return (Token.getRange("IsWord", true).match(ch)) ? WT_LETTER : WT_OTHER;
@@ -2414,12 +2387,12 @@ public class RegularExpression implement
     static final int LINE_SEPARATOR = 0x2028;
     static final int PARAGRAPH_SEPARATOR = 0x2029;
 
-    private static final boolean isEOLChar(int ch) {
+    private static boolean isEOLChar(int ch) {
         return ch == LINE_FEED || ch == CARRIAGE_RETURN || ch == LINE_SEPARATOR
                 || ch == PARAGRAPH_SEPARATOR;
     }
 
-    private static final boolean isWordChar(int ch) { // Legacy word characters
+    private static boolean isWordChar(int ch) { // Legacy word characters
         if (ch == '_')  return true;
         if (ch < '0')  return false;
         if (ch > 'z')  return false;
@@ -2430,7 +2403,7 @@ public class RegularExpression implement
         return true;
     }
 
-    private static final boolean matchIgnoreCase(int chardata, int ch) {
+    private static boolean matchIgnoreCase(int chardata, int ch) {
         if (chardata == ch)  return true;
         if (chardata > 0xffff || ch > 0xffff)  return false;
         char uch1 = Character.toUpperCase((char)chardata);

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/richParser/XMLStreamReaderExt.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/richParser/XMLStreamReaderExt.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/richParser/XMLStreamReaderExt.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/richParser/XMLStreamReaderExt.java Fri Dec 31 00:01:16 2021
@@ -20,13 +20,13 @@ import org.apache.xmlbeans.GDuration;
 import org.apache.xmlbeans.XmlCalendar;
 import org.apache.xmlbeans.impl.common.XmlWhitespace;
 
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
 import javax.xml.namespace.QName;
-import java.math.BigInteger;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.InputStream;
 import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.util.Date;
-import java.io.InputStream;
 
 /**
  * This interface extends the simple XMLStreamReader interface adding
@@ -215,7 +215,7 @@ public interface XMLStreamReaderExt
     /** Sets the default value for the next getXXXValue() call.
      *  For example:
      *     setDefaultValue("7");
-     *     //the xml looks like: <int>  </int>
+     *     //the xml looks like: {@code <int>  </int>}
      *     int i = getIntValue(); // returns 7
      *     // from now on the default value will not apply anymore
      * Note: Works for getAttributeXXXValue(...) too.

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java Fri Dec 31 00:01:16 2021
@@ -145,6 +145,7 @@ public final class SchemaTypeCodePrinter
         emit("");
         emit("import javax.xml.namespace.QName;");
         emit("import org.apache.xmlbeans.QNameSet;");
+        emit("import org.apache.xmlbeans.XmlObject;");
         emit("");
         printInnerTypeImpl(sType, sType.getTypeSystem(), false);
     }
@@ -2352,12 +2353,15 @@ public final class SchemaTypeCodePrinter
         decl.append("public ").append(method.getReturnType());
         decl.append(" ").append(method.getName()).append("(");
 
+        // first parameter is always XmlObject, i.e. which is "this" and therefore doesn't need
+        // to be in the method declaration of the type implementation
         String[] paramTypes = method.getParameterTypes();
-        for (int i = 0; i < paramTypes.length; i++) {
-            if (i != 0) {
+        String[] paramNames = method.getParameterNames();
+        for (int i = 1; i < paramTypes.length; i++) {
+            if (i > 1) {
                 decl.append(", ");
             }
-            decl.append(paramTypes[i]).append(" p").append(i);
+            decl.append(paramTypes[i]).append(" ").append(paramNames[i]);
         }
 
         decl.append(")");
@@ -2382,8 +2386,9 @@ public final class SchemaTypeCodePrinter
         impl.append(handler).append(".").append(method.getName()).append("(this");
 
         String[] params = method.getParameterTypes();
-        for (int i = 0; i < params.length; i++) {
-            impl.append(", p").append(i);
+        String[] paramsNames = method.getParameterNames();
+        for (int i = 1; i < params.length; i++) {
+            impl.append(", ").append(paramsNames[i]);
         }
 
         impl.append(");");

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java Fri Dec 31 00:01:16 2021
@@ -2325,12 +2325,14 @@ public final class SchemaTypeImpl implem
      * Returns a QNameSet of elements that may exist in wildcard
      * buchets and are not explicitly defined in this schema type.
      * Note: In this example:
+     * <pre>{@code
      * <xs:complexType name="exampleType">
      * <xs:sequence>
      * <xs:element name="someElement" type='xs:string' />
      * <xs:any namespace="##targetNamespace" />
      * </xs:sequence>
      * </xs:complexType>
+     * }</pre>
      * the returned QNameSet will not contain the qname of 'someElement'.
      *
      * @return the constructed QNameSet
@@ -2366,11 +2368,13 @@ public final class SchemaTypeImpl implem
      * Returns a QNameSet of attributes that may exist in wildcard
      * buchets and are not explicitly defined in this schema type.
      * Note: In this example:
+     * <pre>{@code
      * <xs:complexType name="exampleType">
      * ...
      * <xs:attribute name='someAttribute' type='xs:string' />
      * <xs:anyAttribute namespace="##targetNamespace" />
      * </xs:complexType>
+     * }</pre>
      * the returned QNameSet will not contain the qname of 'someAttribute'.
      *
      * @return the constructed QNameSet

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderImpl.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderImpl.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderImpl.java Fri Dec 31 00:01:16 2021
@@ -55,8 +55,8 @@ public class SchemaTypeLoaderImpl extend
 
     private static class SchemaTypeLoaderCache extends SystemCache {
         // The following maintains a cache of SchemaTypeLoaders per ClassLoader per Thread.
-        // I use soft references to allow the garbage collector to reclain the type loaders
-        // and/pr class loaders at will.
+        // I use soft references to allow the garbage collector to reclaim the type loaders
+        // and/or class loaders at will.
 
         private final ThreadLocal<List<SoftReference<SchemaTypeLoaderImpl>>> _cachedTypeSystems = ThreadLocal.withInitial(ArrayList::new);
 
@@ -596,8 +596,6 @@ public class SchemaTypeLoaderImpl extend
     private static final SchemaTypeLoader[] EMPTY_SCHEMATYPELOADER_ARRAY = new SchemaTypeLoader[0];
 
     static {
-        if (SystemCache.get() != null) {
-            SystemCache.set(new SchemaTypeLoaderCache());
-        }
+        SystemCache.set(new SchemaTypeLoaderCache());
     }
 }

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SoapEncSchemaTypeSystem.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SoapEncSchemaTypeSystem.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SoapEncSchemaTypeSystem.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SoapEncSchemaTypeSystem.java Fri Dec 31 00:01:16 2021
@@ -211,7 +211,7 @@ public class SoapEncSchemaTypeSystem ext
     }
 
     /**
-     * Describe <code>resolve</code> method here.
+     * Describe {@code resolve} method here.
      */
     public void resolve() {
         // don't need to do anything; already resolved
@@ -278,9 +278,9 @@ public class SoapEncSchemaTypeSystem ext
     }
 
     /**
-     * Describe <code>saveToDirectory</code> method here.
+     * Describe {@code saveToDirectory} method here.
      *
-     * @param file a <code>File</code> value
+     * @param file a {@code File} value
      */
     public void saveToDirectory(File file) {
         throw new UnsupportedOperationException("The builtin soap encoding schema type system cannot be saved.");

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/StscChecker.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/StscChecker.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/StscChecker.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/StscChecker.java Fri Dec 31 00:01:16 2021
@@ -50,7 +50,7 @@ public class StscChecker {
 
     /**
      * The following code checks rule #5 of http://www.w3.org/TR/xmlschema-1/#coss-ct
-     * as well as attribute + element default/fixed validity. <p/>
+     * as well as attribute + element default/fixed validity.<p>
      * Checks that xs:NOTATION is not used directly
      */
     public static void checkFields(SchemaTypeImpl sType) {
@@ -448,7 +448,6 @@ public class StscChecker {
      * @param errors       - Invalid restriction errors are put into this collection
      * @param context      . the context
      * @return boolean, true if valid restruction, false if invalid restriction
-     * @
      */
     public static boolean isParticleValidRestriction(SchemaParticle baseModel, SchemaParticle derivedModel, Collection<XmlError> errors, XmlObject context) {
         boolean restrictionValid = false;

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XQuerySchemaTypeSystem.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XQuerySchemaTypeSystem.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XQuerySchemaTypeSystem.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XQuerySchemaTypeSystem.java Fri Dec 31 00:01:16 2021
@@ -33,8 +33,6 @@ import java.util.Map;
  * Same as {@link BuiltinSchemaTypeSystem} but adds three extra types
  * (<i>dayTimeDuration</i>, <i>yearMonthDuration</i> and <i>anyAtomicType</i>)
  * and makes all the primitives extend <i>anyAtomicType</i>.
- *
- * @author Radu Preotiuc
  */
 @SuppressWarnings("unused")
 public class XQuerySchemaTypeSystem extends SchemaTypeLoaderBase implements

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XmlObjectFactory.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XmlObjectFactory.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XmlObjectFactory.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/XmlObjectFactory.java Fri Dec 31 00:01:16 2021
@@ -65,6 +65,7 @@ public class XmlObjectFactory<T> extends
      * Use the <em>options</em> parameter to specify the following:</p>
      *
      * <table>
+     * <caption>Option parameter</caption>
      * <tr><th>To specify this</th><th>Use this method</th></tr>
      * <tr>
      *  <td>The document type for the root element.</td>
@@ -78,7 +79,7 @@ public class XmlObjectFactory<T> extends
      *
      * @param options Options specifying root document type and/or value facet
      *                checking.
-     * @return A new, empty instance of XmlObject.</li>
+     * @return A new, empty instance of XmlObject.
      */
     @Override
     public T newInstance(XmlOptions options) {
@@ -106,6 +107,7 @@ public class XmlObjectFactory<T> extends
      * Use the <em>options</em> parameter to specify the following:</p>
      *
      * <table>
+     * <caption>Option parameter</caption>
      * <tr><th>To specify this</th><th>Use this method</th></tr>
      * <tr>
      *  <td>The document type for the root element.</td>
@@ -209,6 +211,7 @@ public class XmlObjectFactory<T> extends
      * Use the <em>options</em> parameter to specify the following:</p>
      *
      * <table>
+     * <caption>Option parameter</caption>
      * <tr><th>To specify this</th><th>Use this method</th></tr>
      * <tr>
      *  <td>The character encoding to use when parsing or writing a document.</td>

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/AttachmentPart.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/AttachmentPart.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/AttachmentPart.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/AttachmentPart.java Fri Dec 31 00:01:16 2021
@@ -20,16 +20,16 @@ package org.apache.xmlbeans.impl.soap;
 import java.util.Iterator;
 
 /**
- * <P>A single attachment to a <CODE>SOAPMessage</CODE> object. A
- *   <CODE>SOAPMessage</CODE> object may contain zero, one, or many
- *   <CODE>AttachmentPart</CODE> objects. Each <CODE>
- *   AttachmentPart</CODE> object consists of two parts,
+ * A single attachment to a {@code SOAPMessage} object. A
+ *   {@code SOAPMessage} object may contain zero, one, or many
+ *   {@code AttachmentPart} objects. Each {@code
+ *   AttachmentPart} object consists of two parts,
  *   application-specific content and associated MIME headers. The
  *   MIME headers consists of name/value pairs that can be used to
- *   identify and describe the content.</P>
+ *   identify and describe the content.<p>
  *
- *   <P>An <CODE>AttachmentPart</CODE> object must conform to
- *   certain standards.</P>
+ *   An {@code AttachmentPart} object must conform to
+ *   certain standards.
  *
  *   <OL>
  *     <LI>It must conform to <A href=
@@ -43,56 +43,53 @@ import java.util.Iterator;
  *
  *       <UL>
  *         <LI>
- *           <CODE>Content-Type</CODE><BR>
+ *           {@code Content-Type}<BR>
  *            This header identifies the type of data in the content
- *           of an <CODE>AttachmentPart</CODE> object and MUST
+ *           of an {@code AttachmentPart} object and MUST
  *           conform to [RFC2045]. The following is an example of a
  *           Content-Type header:
  * <PRE>
  *      Content-Type:  application/xml
  *
  * </PRE>
- *           The following line of code, in which <CODE>ap</CODE> is
- *           an <CODE>AttachmentPart</CODE> object, sets the header
+ *           The following line of code, in which {@code ap} is
+ *           an {@code AttachmentPart} object, sets the header
  *           shown in the previous example.
- * <PRE>
+ * <PRE>{@code
  *      ap.setMimeHeader("Content-Type", "application/xml");
- *
- * </PRE>
- *
- *           <P></P>
+ * }</PRE>
  *         </LI>
  *       </UL>
  *     </LI>
  *   </OL>
  *
  *   <P>There are no restrictions on the content portion of an
- *   <CODE>AttachmentPart</CODE> object. The content may be anything
+ *   {@code AttachmentPart} object. The content may be anything
  *   from a simple plain text object to a complex XML document or
  *   image file.</P>
  *
- *   <P>An <CODE>AttachmentPart</CODE> object is created with the
- *   method <CODE>SOAPMessage.createAttachmentPart</CODE>. After
- *   setting its MIME headers, the <CODE>AttachmentPart</CODE>
+ *   <P>An {@code AttachmentPart} object is created with the
+ *   method {@code SOAPMessage.createAttachmentPart}. After
+ *   setting its MIME headers, the {@code AttachmentPart}
  *   object is added to the message that created it with the method
- *   <CODE>SOAPMessage.addAttachmentPart</CODE>.</P>
+ *   {@code SOAPMessage.addAttachmentPart}.<P>
  *
- *   <P>The following code fragment, in which <CODE>m</CODE> is a
- *   <CODE>SOAPMessage</CODE> object and <CODE>contentStringl</CODE>
- *   is a <CODE>String</CODE>, creates an instance of <CODE>
- *   AttachmentPart</CODE>, sets the <CODE>AttachmentPart</CODE>
+ *   The following code fragment, in which {@code m} is a
+ *   {@code SOAPMessage} object and {@code contentStringl}
+ *   is a {@code String}, creates an instance of {@code
+ *   AttachmentPart}, sets the {@code AttachmentPart}
  *   object with some content and header information, and adds the
- *   <CODE>AttachmentPart</CODE> object to the <CODE>
- *   SOAPMessage</CODE> object.</P>
+ *   {@code AttachmentPart} object to the {@code
+ *   SOAPMessage} object.
  * <PRE>
  *    AttachmentPart ap1 = m.createAttachmentPart();
  *    ap1.setContent(contentString1, "text/plain");
  *    m.addAttachmentPart(ap1);
  * </PRE>
  *
- *   <P>The following code fragment creates and adds a second <CODE>
- *   AttachmentPart</CODE> instance to the same message. <CODE>
- *   jpegData</CODE> is a binary byte buffer representing the jpeg
+ *   <P>The following code fragment creates and adds a second {@code
+ *   AttachmentPart} instance to the same message. {@code
+ *   jpegData} is a binary byte buffer representing the jpeg
  *   file.</P>
  * <PRE>
  *    AttachmentPart ap2 = m.createAttachmentPart();
@@ -101,19 +98,19 @@ import java.util.Iterator;
  *    m.addAttachmentPart(ap2);
  * </PRE>
  *
- *   <P>The <CODE>getContent</CODE> method retrieves the contents
- *   and header from an <CODE>AttachmentPart</CODE> object.
- *   Depending on the <CODE>DataContentHandler</CODE> objects
- *   present, the returned <CODE>Object</CODE> can either be a typed
- *   Java object corresponding to the MIME type or an <CODE>
- *   InputStream</CODE> object that contains the content as
+ *   <P>The {@code getContent} method retrieves the contents
+ *   and header from an {@code AttachmentPart} object.
+ *   Depending on the {@code DataContentHandler} objects
+ *   present, the returned {@code Object} can either be a typed
+ *   Java object corresponding to the MIME type or an {@code
+ *   InputStream} object that contains the content as
  *   bytes.</P>
  * <PRE>
  *    String content1 = ap1.getContent();
  *    java.io.InputStream content2 = ap2.getContent();
  * </PRE>
- *   The method <CODE>clearContent</CODE> removes all the content
- *   from an <CODE>AttachmentPart</CODE> object but does not affect
+ *   The method {@code clearContent} removes all the content
+ *   from an {@code AttachmentPart} object but does not affect
  *   its header information.
  * <PRE>
  *    ap1.clearContent();
@@ -126,9 +123,9 @@ public abstract class AttachmentPart {
     public AttachmentPart() {}
 
     /**
-     * Returns the number of bytes in this <CODE>
-     * AttachmentPart</CODE> object.
-     * @return the size of this <CODE>AttachmentPart</CODE> object
+     * Returns the number of bytes in this {@code
+     * AttachmentPart} object.
+     * @return the size of this {@code AttachmentPart} object
      *     in bytes or -1 if the size cannot be determined
      * @throws  SOAPException  if the content of this
      *     attachment is corrupted of if there was an exception
@@ -137,106 +134,78 @@ public abstract class AttachmentPart {
     public abstract int getSize() throws SOAPException;
 
     /**
-     * Clears out the content of this <CODE>
-     * AttachmentPart</CODE> object. The MIME header portion is left
+     * Clears out the content of this {@code
+     * AttachmentPart} object. The MIME header portion is left
      * untouched.
      */
     public abstract void clearContent();
 
     /**
-     * Gets the content of this <code>AttachmentPart</code> object as a Java
+     * Gets the content of this {@code AttachmentPart} object as a Java
      * object. The type of the returned Java object depends on (1) the
-     * <code>DataContentHandler</code> object that is used to interpret the bytes
-     * and (2) the <code>Content-Type</code> given in the header.
+     * {@code DataContentHandler} object that is used to interpret the bytes
+     * and (2) the {@code Content-Type} given in the header.
      * <p>
      * For the MIME content types "text/plain", "text/html" and "text/xml", the
-     * <code>DataContentHandler</code> object does the conversions to and
+     * {@code DataContentHandler} object does the conversions to and
      * from the Java types corresponding to the MIME types.
-     * For other MIME types,the <code>DataContentHandler</code> object
-     * can return an <code>InputStream</code> object that contains the content data
+     * For other MIME types,the {@code DataContentHandler} object
+     * can return an {@code InputStream} object that contains the content data
      * as raw bytes.
      * <p>
      * A JAXM-compliant implementation must, as a minimum, return a
-     * <code>java.lang.String</code> object corresponding to any content
-     * stream with a <code>Content-Type</code> value of
-     * <code>text/plain</code>, a
-     * <code>javax.xml.transform.StreamSource</code> object corresponding to a
-     * content stream with a <code>Content-Type</code> value of
-     * <code>text/xml</code>, a <code>java.awt.Image</code> object
+     * {@code java.lang.String} object corresponding to any content
+     * stream with a {@code Content-Type} value of
+     * {@code text/plain}, a
+     * {@code javax.xml.transform.StreamSource} object corresponding to a
+     * content stream with a {@code Content-Type} value of
+     * {@code text/xml}, a {@code java.awt.Image} object
      * corresponding to a content stream with a
-     * <code>Content-Type</code> value of <code>image/gif</code> or
-     * <code>image/jpeg</code>.  For those content types that an
-     * installed <code>DataContentHandler</code> object does not understand, the
-     * <code>DataContentHandler</code> object is required to return a
-     * <code>java.io.InputStream</code> object with the raw bytes.
+     * {@code Content-Type} value of {@code image/gif} or
+     * {@code image/jpeg}.  For those content types that an
+     * installed {@code DataContentHandler} object does not understand, the
+     * {@code DataContentHandler} object is required to return a
+     * {@code java.io.InputStream} object with the raw bytes.
      *
-     * @return a Java object with the content of this <CODE>
-     *     AttachmentPart</CODE> object
+     * @return a Java object with the content of this {@code
+     *     AttachmentPart} object
      * @throws  SOAPException  if there is no content set
-     *     into this <CODE>AttachmentPart</CODE> object or if there
+     *     into this {@code AttachmentPart} object or if there
      *     was a data transformation error
      */
     public abstract Object getContent() throws SOAPException;
 
     /**
      * Sets the content of this attachment part to that of the
-     * given <CODE>Object</CODE> and sets the value of the <CODE>
-     * Content-Type</CODE> header to the given type. The type of the
-     * <CODE>Object</CODE> should correspond to the value given for
-     * the <CODE>Content-Type</CODE>. This depends on the particular
-     * set of <CODE>DataContentHandler</CODE> objects in use.
+     * given {@code Object} and sets the value of the {@code
+     * Content-Type} header to the given type. The type of the
+     * {@code Object} should correspond to the value given for
+     * the {@code Content-Type}. This depends on the particular
+     * set of {@code DataContentHandler} objects in use.
      * @param  object  the Java object that makes up
      * the content for this attachment part
      * @param  contentType the MIME string that
      * specifies the type of the content
      * @throws java.lang.IllegalArgumentException if
      *     the contentType does not match the type of the content
-     *     object, or if there was no <CODE>
-     *     DataContentHandler</CODE> object for this content
+     *     object, or if there was no {@code
+     *     DataContentHandler} object for this content
      *     object
      * @see #getContent() getContent()
      */
     public abstract void setContent(Object object, String contentType);
 
     /**
-     * Gets the <CODE>DataHandler</CODE> object for this <CODE>
-     * AttachmentPart</CODE> object.
-     * @return the <CODE>DataHandler</CODE> object associated with
-     *     this <CODE>AttachmentPart</CODE> object
-     * @throws  SOAPException  if there is
-     *     no data in this <CODE>AttachmentPart</CODE> object
-     */
-// ericvas
-//    public abstract DataHandler getDataHandler() throws SOAPException;
-
-    /**
-     * Sets the given <CODE>DataHandler</CODE> object as the
-     * data handler for this <CODE>AttachmentPart</CODE> object.
-     * Typically, on an incoming message, the data handler is
-     * automatically set. When a message is being created and
-     * populated with content, the <CODE>setDataHandler</CODE>
-     * method can be used to get data from various data sources into
-     * the message.
-     * @param  datahandler  <CODE>DataHandler</CODE> object to
-     *     be set
-     * @throws java.lang.IllegalArgumentException if
-     *     there was a problem with the specified <CODE>
-     *     DataHandler</CODE> object
-     */
-// ericvas
-//    public abstract void setDataHandler(DataHandler datahandler);
-
-    /**
      * Gets the value of the MIME header whose name is
      * "Content-Id".
-     * @return  a <CODE>String</CODE> giving the value of the
-     *     "Content-Id" header or <CODE>null</CODE> if there is
+     * @return  a {@code String} giving the value of the
+     *     "Content-Id" header or {@code null} if there is
      *     none
      * @see #setContentId(java.lang.String) setContentId(java.lang.String)
      */
     public String getContentId() {
 
-        String as[] = getMimeHeader("Content-Id");
+        String[] as = getMimeHeader("Content-Id");
 
         if (as != null && as.length > 0) {
             return as[0];
@@ -248,13 +217,13 @@ public abstract class AttachmentPart {
     /**
      * Gets the value of the MIME header
      * "Content-Location".
-     * @return  a <CODE>String</CODE> giving the value of the
-     *     "Content-Location" header or <CODE>null</CODE> if there
+     * @return  a {@code String} giving the value of the
+     *     "Content-Location" header or {@code null} if there
      *     is none
      */
     public String getContentLocation() {
 
-        String as[] = getMimeHeader("Content-Location");
+        String[] as = getMimeHeader("Content-Location");
 
         if (as != null && as.length > 0) {
             return as[0];
@@ -265,13 +234,13 @@ public abstract class AttachmentPart {
 
     /**
      * Gets the value of the MIME header "Content-Type".
-     * @return  a <CODE>String</CODE> giving the value of the
-     *     "Content-Type" header or <CODE>null</CODE> if there is
+     * @return  a {@code String} giving the value of the
+     *     "Content-Type" header or {@code null} if there is
      *     none
      */
     public String getContentType() {
 
-        String as[] = getMimeHeader("Content-Type");
+        String[] as = getMimeHeader("Content-Type");
 
         if (as != null && as.length > 0) {
             return as[0];
@@ -283,11 +252,11 @@ public abstract class AttachmentPart {
     /**
      * Sets the MIME header "Content-Id" with the given
      * value.
-     * @param  contentId a <CODE>String</CODE> giving
+     * @param  contentId a {@code String} giving
      *     the value of the "Content-Id" header
      * @throws java.lang.IllegalArgumentException if
-     *     there was a problem with the specified <CODE>
-     *     contentId</CODE> value
+     *     there was a problem with the specified {@code
+     *     contentId} value
      * @see #getContentId() getContentId()
      */
     public void setContentId(String contentId) {
@@ -297,7 +266,7 @@ public abstract class AttachmentPart {
     /**
      * Sets the MIME header "Content-Location" with the given
      * value.
-     * @param  contentLocation a <CODE>String</CODE>
+     * @param  contentLocation a {@code String}
      *     giving the value of the "Content-Location" header
      * @throws java.lang.IllegalArgumentException if
      *     there was a problem with the specified content
@@ -310,7 +279,7 @@ public abstract class AttachmentPart {
     /**
      * Sets the MIME header "Content-Type" with the given
      * value.
-     * @param  contentType  a <CODE>String</CODE>
+     * @param  contentType  a {@code String}
      *     giving the value of the "Content-Type" header
      * @throws java.lang.IllegalArgumentException if
      * there was a problem with the specified content type
@@ -331,10 +300,10 @@ public abstract class AttachmentPart {
 
     /**
      * Gets all the values of the header identified by the given
-     * <CODE>String</CODE>.
+     * {@code String}.
      * @param   name  the name of the header; example:
      *     "Content-Type"
-     * @return a <CODE>String</CODE> array giving the value for the
+     * @return a {@code String} array giving the value for the
      *     specified header
      * @see #setMimeHeader(java.lang.String, java.lang.String) setMimeHeader(java.lang.String, java.lang.String)
      */
@@ -348,9 +317,9 @@ public abstract class AttachmentPart {
      *
      *   <P>Note that RFC822 headers can only contain US-ASCII
      *   characters.</P>
-     * @param  name   a <CODE>String</CODE> giving the
+     * @param  name   a {@code String} giving the
      *     name of the header for which to search
-     * @param  value  a <CODE>String</CODE> giving the
+     * @param  value  a {@code String} giving the
      *     value to be set for the header whose name matches the
      *     given name
      * @throws java.lang.IllegalArgumentException if
@@ -361,13 +330,13 @@ public abstract class AttachmentPart {
 
     /**
      * Adds a MIME header with the specified name and value to
-     *   this <CODE>AttachmentPart</CODE> object.
+     *   this {@code AttachmentPart} object.
      *
      *   <P>Note that RFC822 headers can contain only US-ASCII
      *   characters.</P>
-     * @param  name   a <CODE>String</CODE> giving the
+     * @param  name   a {@code String} giving the
      *     name of the header to be added
-     * @param  value  a <CODE>String</CODE> giving the
+     * @param  value  a {@code String} giving the
      *     value of the header to be added
      * @throws java.lang.IllegalArgumentException if
      *     there was a problem with the specified mime header name
@@ -376,35 +345,35 @@ public abstract class AttachmentPart {
     public abstract void addMimeHeader(String name, String value);
 
     /**
-     * Retrieves all the headers for this <CODE>
-     * AttachmentPart</CODE> object as an iterator over the <CODE>
-     * MimeHeader</CODE> objects.
-     * @return  an <CODE>Iterator</CODE> object with all of the Mime
-     *     headers for this <CODE>AttachmentPart</CODE> object
+     * Retrieves all the headers for this {@code
+     * AttachmentPart} object as an iterator over the {@code
+     * MimeHeader} objects.
+     * @return  an {@code Iterator} object with all of the Mime
+     *     headers for this {@code AttachmentPart} object
      */
     public abstract Iterator getAllMimeHeaders();
 
     /**
-     * Retrieves all <CODE>MimeHeader</CODE> objects that match
+     * Retrieves all {@code MimeHeader} objects that match
      * a name in the given array.
-     * @param   names a <CODE>String</CODE> array with
+     * @param   names a {@code String} array with
      *     the name(s) of the MIME headers to be returned
      * @return all of the MIME headers that match one of the names
-     *     in the given array as an <CODE>Iterator</CODE>
+     *     in the given array as an {@code Iterator}
      *     object
      */
-    public abstract Iterator getMatchingMimeHeaders(String names[]);
+    public abstract Iterator getMatchingMimeHeaders(String[] names);
 
     /**
-     * Retrieves all <CODE>MimeHeader</CODE> objects whose name
+     * Retrieves all {@code MimeHeader} objects whose name
      * does not match a name in the given array.
-     * @param   names  a <CODE>String</CODE> array with
+     * @param   names  a {@code String} array with
      *     the name(s) of the MIME headers not to be returned
-     * @return all of the MIME headers in this <CODE>
-     *     AttachmentPart</CODE> object except those that match one
+     * @return all of the MIME headers in this {@code
+     *     AttachmentPart} object except those that match one
      *     of the names in the given array. The nonmatching MIME
-     *     headers are returned as an <CODE>Iterator</CODE>
+     *     headers are returned as an {@code Iterator}
      *     object.
      */
-    public abstract Iterator getNonMatchingMimeHeaders(String names[]);
+    public abstract Iterator getNonMatchingMimeHeaders(String[] names);
 }

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/Detail.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/Detail.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/Detail.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/Detail.java Fri Dec 31 00:01:16 2021
@@ -18,25 +18,25 @@ package org.apache.xmlbeans.impl.soap;
 import java.util.Iterator;
 
 /**
- * A container for <code>DetailEntry</code> objects. <code>DetailEntry</code>
+ * A container for {@code DetailEntry} objects. {@code DetailEntry}
  * objects give detailed error information that is application-specific and
- * related to the <code>SOAPBody</code> object that contains it.
+ * related to the {@code SOAPBody} object that contains it.
  * <P>
- * A <code>Detail</code> object, which is part of a <code>SOAPFault</code>
- * object, can be retrieved using the method <code>SOAPFault.getDetail</code>.
- * The <code>Detail</code> interface provides two methods. One creates a new
- * <code>DetailEntry</code> object and also automatically adds it to
- * the <code>Detail</code> object. The second method gets a list of the
- * <code>DetailEntry</code> objects contained in a <code>Detail</code>
+ * A {@code Detail} object, which is part of a {@code SOAPFault}
+ * object, can be retrieved using the method {@code SOAPFault.getDetail}.
+ * The {@code Detail} interface provides two methods. One creates a new
+ * {@code DetailEntry} object and also automatically adds it to
+ * the {@code Detail} object. The second method gets a list of the
+ * {@code DetailEntry} objects contained in a {@code Detail}
  * object.
  * <P>
- * The following code fragment, in which <i>sf</i> is a <code>SOAPFault</code>
- * object, gets its <code>Detail</code> object (<i>d</i>), adds a new
- * <code>DetailEntry</code> object to <i>d</i>, and then gets a list of all the
- * <code>DetailEntry</code> objects in <i>d</i>. The code also creates a
- * <code>Name</code> object to pass to the method <code>addDetailEntry</code>.
- * The variable <i>se</i>, used to create the <code>Name</code> object,
- * is a <code>SOAPEnvelope</code> object.
+ * The following code fragment, in which <i>sf</i> is a {@code SOAPFault}
+ * object, gets its {@code Detail} object (<i>d</i>), adds a new
+ * {@code DetailEntry} object to <i>d</i>, and then gets a list of all the
+ * {@code DetailEntry} objects in <i>d</i>. The code also creates a
+ * {@code Name} object to pass to the method {@code addDetailEntry}.
+ * The variable <i>se</i>, used to create the {@code Name} object,
+ * is a {@code SOAPEnvelope} object.
  * <PRE>
  *    Detail d = sf.getDetail();
  *    Name name = se.createName("GetLastTradePrice", "WOMBAT",
@@ -48,18 +48,18 @@ import java.util.Iterator;
 public interface Detail extends SOAPFaultElement {
 
     /**
-     * Creates a new <code>DetailEntry</code> object with the given
-     * name and adds it to this <code>Detail</code> object.
-     * @param   name a <code>Name</code> object identifying the new <code>DetailEntry</code> object
+     * Creates a new {@code DetailEntry} object with the given
+     * name and adds it to this {@code Detail} object.
+     * @param   name a {@code Name} object identifying the new {@code DetailEntry} object
      * @return DetailEntry.
      * @throws SOAPException  thrown when there is a problem in adding a DetailEntry object to this Detail object.
      */
     public abstract DetailEntry addDetailEntry(Name name) throws SOAPException;
 
     /**
-     * Gets a list of the detail entries in this <code>Detail</code> object.
-     * @return  an <code>Iterator</code> object over the <code>DetailEntry</code>
-     *        objects in this <code>Detail</code> object
+     * Gets a list of the detail entries in this {@code Detail} object.
+     * @return  an {@code Iterator} object over the {@code DetailEntry}
+     *        objects in this {@code Detail} object
      */
     public abstract Iterator getDetailEntries();
 }

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/DetailEntry.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/DetailEntry.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/DetailEntry.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/DetailEntry.java Fri Dec 31 00:01:16 2021
@@ -16,10 +16,9 @@
 package org.apache.xmlbeans.impl.soap;
 
 /**
- * The content for a <code>Detail</code> object, giving details for
- * a <code>SOAPFault</code> object.  A <code>DetailEntry</code> object,
- * which carries information about errors related to the <code>SOAPBody</code>
+ * The content for a {@code Detail} object, giving details for
+ * a {@code SOAPFault} object.  A {@code DetailEntry} object,
+ * which carries information about errors related to the {@code SOAPBody}
  * object that contains it, is application-specific.
- * <P>
  */
 public interface DetailEntry extends SOAPElement {}

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/FactoryFinder.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/FactoryFinder.java?rev=1896561&r1=1896560&r2=1896561&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/FactoryFinder.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/soap/FactoryFinder.java Fri Dec 31 00:01:16 2021
@@ -124,15 +124,15 @@ class FactoryFinder {
      * Returns an input stream for the specified resource.
      *
      * <p>This method will firstly try
-     * <code>ClassLoader.getSystemResourceAsStream()</code> then
+     * {@code ClassLoader.getSystemResourceAsStream()} then
      * the class loader of the current thread with
-     * <code>getResourceAsStream()</code> and finally attempt
-     * <code>getResourceAsStream()</code> on
-     * <code>FactoryFinder.class.getClassLoader()</code>.
+     * {@code getResourceAsStream()} and finally attempt
+     * {@code getResourceAsStream()} on
+     * {@code FactoryFinder.class.getClassLoader()}.
      *
      * @param factoryResource the resource name
      * @return an InputStream that can be used to read that resource, or
-     * <code>null</code> if the resource could not be resolved
+     * {@code null} if the resource could not be resolved
      */
     private static InputStream getResource(String factoryResource) {
         ClassLoader classloader = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org