1 19 20 package org.netbeans.tax; 21 22 28 public class UnicodeClasses { 29 30 31 UnicodeClasses () { 32 } 33 34 38 41 public static boolean isXMLChar (int c) { 42 if ( c == 0x0009 ) return true; 44 45 if ( c == 0x000a ) return true; 47 48 if ( c == 0x000d ) return true; 50 51 if ( c < 0x0020 ) return false; 53 if ( c <= 0xd7ff ) return true; 54 55 if ( c < 0xe000 ) return false; 57 if ( c <= 0xfffd ) return true; 58 59 if ( c < 0x10000 ) return false; 61 if ( c <= 0x10ffff ) return true; 62 63 return false; 64 } 65 66 69 public static boolean isXMLNameChar (int c) { 70 return ( ( isXMLLetter (c) ) 71 || ( isXMLDigit (c) ) 72 || ( c == '.' ) 73 || ( c == '-' ) 74 || ( c == '_' ) 75 || ( c == ':' ) 76 || ( isXMLCombiningChar (c) ) 77 || ( isXMLExtender (c) ) ); 78 } 79 80 83 public static boolean isXMLNameStartChar (int c) { 84 return ( ( isXMLLetter (c) ) 85 || ( c == '_' ) 86 || ( c ==':' ) ); 87 } 88 89 92 public static boolean isXMLLetter (int c) { 93 return ( isXMLBaseChar (c) || isXMLIdeographic (c) ); 94 } 95 96 99 public static boolean isXMLBaseChar (int c) { 100 if ( c < 0x0041 ) return false; 102 if ( c <= 0x005a ) return true; 103 104 if ( c < 0x0061 ) return false; 106 if ( c <= 0x007a ) return true; 107 108 if ( c < 0x00c0 ) return false; 110 if ( c <= 0x00d6 ) return true; 111 112 if ( c < 0x00d8 ) return false; 114 if ( c <= 0x00f6 ) return true; 115 116 if ( c < 0x00f8 ) return false; 118 if ( c <= 0x00ff ) return true; 119 120 if ( c < 0x0100 ) return false; 122 if ( c <= 0x0131 ) return true; 123 124 if ( c < 0x0134 ) return false; 126 if ( c <= 0x013e ) return true; 127 128 if ( c < 0x0141 ) return false; 130 if ( c <= 0x0148 ) return true; 131 132 if ( c < 0x014a ) return false; 134 if ( c <= 0x017e ) return true; 135 136 if ( c < 0x0180 ) return false; 138 if ( c <= 0x01c3 ) return true; 139 140 if ( c < 0x01cd ) return false; 142 if ( c <= 0x01f0 ) return true; 143 144 if ( c < 0x01f4 ) return false; 146 if ( c <= 0x01f5 ) return true; 147 148 if ( c < 0x01fa ) return false; 150 if ( c <= 0x0217 ) return true; 151 152 if ( c < 0x0250 ) return false; 154 if ( c <= 0x02a8 ) return true; 155 156 if ( c < 0x02bb ) return false; 158 if ( c <= 0x02c1 ) return true; 159 160 if ( c == 0x0386 ) return true; 162 163 if ( c < 0x0388 ) return false; 165 if ( c <= 0x038a ) return true; 166 167 if ( c == 0x038c ) return true; 169 170 if ( c < 0x038e ) return false; 172 if ( c <= 0x03a1 ) return true; 173 174 if ( c < 0x03a3 ) return false; 176 if ( c <= 0x03ce ) return true; 177 178 if ( c < 0x03d0 ) return false; 180 if ( c <= 0x03d6 ) return true; 181 182 if ( c == 0x03da ) return true; 184 185 if ( c == 0x03dc ) return true; 187 188 if ( c == 0x03de ) return true; 190 191 if ( c == 0x03e0 ) return true; 193 194 if ( c < 0x03e2 ) return false; 196 if ( c <= 0x03f3 ) return true; 197 198 if ( c < 0x0401 ) return false; 200 if ( c <= 0x040c ) return true; 201 202 if ( c < 0x040e ) return false; 204 if ( c <= 0x044f ) return true; 205 206 if ( c < 0x0451 ) return false; 208 if ( c <= 0x045c ) return true; 209 210 if ( c < 0x045e ) return false; 212 if ( c <= 0x0481 ) return true; 213 214 if ( c < 0x0490 ) return false; 216 if ( c <= 0x04c4 ) return true; 217 218 if ( c < 0x04c7 ) return false; 220 if ( c <= 0x04c8 ) return true; 221 222 if ( c < 0x04cb ) return false; 224 if ( c <= 0x04cc ) return true; 225 226 if ( c < 0x04d0 ) return false; 228 if ( c <= 0x04eb ) return true; 229 230 if ( c < 0x04ee ) return false; 232 if ( c <= 0x04f5 ) return true; 233 234 if ( c < 0x04f8 ) return false; 236 if ( c <= 0x04f9 ) return true; 237 238 if ( c < 0x0531 ) return false; 240 if ( c <= 0x0556 ) return true; 241 242 if ( c == 0x0559 ) return true; 244 245 if ( c < 0x0561 ) return false; 247 if ( c <= 0x0586 ) return true; 248 249 if ( c < 0x05d0 ) return false; 251 if ( c <= 0x05ea ) return true; 252 253 if ( c < 0x05f0 ) return false; 255 if ( c <= 0x05f2 ) return true; 256 257 if ( c < 0x0621 ) return false; 259 if ( c <= 0x063a ) return true; 260 261 if ( c < 0x0641 ) return false; 263 if ( c <= 0x064a ) return true; 264 265 if ( c < 0x0671 ) return false; 267 if ( c <= 0x06b7 ) return true; 268 269 if ( c < 0x06ba ) return false; 271 if ( c <= 0x06be ) return true; 272 273 if ( c < 0x06c0 ) return false; 275 if ( c <= 0x06ce ) return true; 276 277 if ( c < 0x06d0 ) return false; 279 if ( c <= 0x06d3 ) return true; 280 281 if ( c == 0x06d5 ) return true; 283 284 if ( c < 0x06e5 ) return false; 286 if ( c <= 0x06e6 ) return true; 287 288 if ( c < 0x0905 ) return false; 290 if ( c <= 0x0939 ) return true; 291 292 if ( c == 0x093d ) return true; 294 295 if ( c < 0x0958 ) return false; 297 if ( c <= 0x0961 ) return true; 298 299 if ( c < 0x0985 ) return false; 301 if ( c <= 0x098c ) return true; 302 303 if ( c < 0x098f ) return false; 305 if ( c <= 0x0990 ) return true; 306 307 if ( c < 0x0993 ) return false; 309 if ( c <= 0x09a8 ) return true; 310 311 if ( c < 0x09aa ) return false; 313 if ( c <= 0x09b0 ) return true; 314 315 if ( c == 0x09b2 ) return true; 317 318 if ( c < 0x09b6 ) return false; 320 if ( c <= 0x09b9 ) return true; 321 322 if ( c < 0x09dc ) return false; 324 if ( c <= 0x09dd ) return true; 325 326 if ( c < 0x09df ) return false; 328 if ( c <= 0x09e1 ) return true; 329 330 if ( c < 0x09f0 ) return false; 332 if ( c <= 0x09f1 ) return true; 333 334 if ( c < 0x0a05 ) return false; 336 if ( c <= 0x0a0a ) return true; 337 338 if ( c < 0x0a0f ) return false; 340 if ( c <= 0x0a10 ) return true; 341 342 if ( c < 0x0a13 ) return false; 344 if ( c <= 0x0a28 ) return true; 345 346 if ( c < 0x0a2a ) return false; 348 if ( c <= 0x0a30 ) return true; 349 350 if ( c < 0x0a32 ) return false; 352 if ( c <= 0x0a33 ) return true; 353 354 if ( c < 0x0a35 ) return false; 356 if ( c <= 0x0a36 ) return true; 357 358 if ( c < 0x0a38 ) return false; 360 if ( c <= 0x0a39 ) return true; 361 362 if ( c < 0x0a59 ) return false; 364 if ( c <= 0x0a5c ) return true; 365 366 if ( c == 0x0a5e ) return true; 368 369 if ( c < 0x0a72 ) return false; 371 if ( c <= 0x0a74 ) return true; 372 373 if ( c < 0x0a85 ) return false; 375 if ( c <= 0x0a8b ) return true; 376 377 if ( c == 0x0a8d ) return true; 379 380 if ( c < 0x0a8f ) return false; 382 if ( c <= 0x0a91 ) return true; 383 384 if ( c < 0x0a93 ) return false; 386 if ( c <= 0x0aa8 ) return true; 387 388 if ( c < 0x0aaa ) return false; 390 if ( c <= 0x0ab0 ) return true; 391 392 if ( c < 0x0ab2 ) return false; 394 if ( c <= 0x0ab3 ) return true; 395 396 if ( c < 0x0ab5 ) return false; 398 if ( c <= 0x0ab9 ) return true; 399 400 if ( c == 0x0abd ) return true; 402 403 if ( c == 0x0ae0 ) return true; 405 406 if ( c < 0x0b05 ) return false; 408 if ( c <= 0x0b0c ) return true; 409 410 if ( c < 0x0b0f ) return false; 412 if ( c <= 0x0b10 ) return true; 413 414 if ( c < 0x0b13 ) return false; 416 if ( c <= 0x0b28 ) return true; 417 418 if ( c < 0x0b2a ) return false; 420 if ( c <= 0x0b30 ) return true; 421 422 if ( c < 0x0b32 ) return false; 424 if ( c <= 0x0b33 ) return true; 425 426 if ( c < 0x0b36 ) return false; 428 if ( c <= 0x0b39 ) return true; 429 430 if ( c == 0x0b3d ) return true; 432 433 if ( c < 0x0b5c ) return false; 435 if ( c <= 0x0b5d ) return true; 436 437 if ( c < 0x0b5f ) return false; 439 if ( c <= 0x0b61 ) return true; 440 441 if ( c < 0x0b85 ) return false; 443 if ( c <= 0x0b8a ) return true; 444 445 if ( c < 0x0b8e ) return false; 447 if ( c <= 0x0b90 ) return true; 448 449 if ( c < 0x0b92 ) return false; 451 if ( c <= 0x0b95 ) return true; 452 453 if ( c < 0x0b99 ) return false; 455 if ( c <= 0x0b9a ) return true; 456 457 if ( c == 0x0b9c ) return true; 459 460 if ( c < 0x0b9e ) return false; 462 if ( c <= 0x0b9f ) return true; 463 464 if ( c < 0x0ba3 ) return false; 466 if ( c <= 0x0ba4 ) return true; 467 468 if ( c < 0x0ba8 ) return false; 470 if ( c <= 0x0baa ) return true; 471 472 if ( c < 0x0bae ) return false; 474 if ( c <= 0x0bb5 ) return true; 475 476 if ( c < 0x0bb7 ) return false; 478 if ( c <= 0x0bb9 ) return true; 479 480 if ( c < 0x0c05 ) return false; 482 if ( c <= 0x0c0c ) return true; 483 484 if ( c < 0x0c0e ) return false; 486 if ( c <= 0x0c10 ) return true; 487 488 if ( c < 0x0c12 ) return false; 490 if ( c <= 0x0c28 ) return true; 491 492 if ( c < 0x0c2a ) return false; 494 if ( c <= 0x0c33 ) return true; 495 496 if ( c < 0x0c35 ) return false; 498 if ( c <= 0x0c39 ) return true; 499 500 if ( c < 0x0c60 ) return false; 502 if ( c <= 0x0c61 ) return true; 503 504 if ( c < 0x0c85 ) return false; 506 if ( c <= 0x0c8c ) return true; 507 508 if ( c < 0x0c8e ) return false; 510 if ( c <= 0x0c90 ) return true; 511 512 if ( c < 0x0c92 ) return false; 514 if ( c <= 0x0ca8 ) return true; 515 516 if ( c < 0x0caa ) return false; 518 if ( c <= 0x0cb3 ) return true; 519 520 if ( c < 0x0cb5 ) return false; 522 if ( c <= 0x0cb9 ) return true; 523 524 if ( c == 0x0cde ) return true; 526 527 if ( c < 0x0ce0 ) return false; 529 if ( c <= 0x0ce1 ) return true; 530 531 if ( c < 0x0d05 ) return false; 533 if ( c <= 0x0d0c ) return true; 534 535 if ( c < 0x0d0e ) return false; 537 if ( c <= 0x0d10 ) return true; 538 539 if ( c < 0x0d12 ) return false; 541 if ( c <= 0x0d28 ) return true; 542 543 if ( c < 0x0d2a ) return false; 545 if ( c <= 0x0d39 ) return true; 546 547 if ( c < 0x0d60 ) return false; 549 if ( c <= 0x0d61 ) return true; 550 551 if ( c < 0x0e01 ) return false; 553 if ( c <= 0x0e2e ) return true; 554 555 if ( c == 0x0e30 ) return true; 557 558 if ( c < 0x0e32 ) return false; 560 if ( c <= 0x0e33 ) return true; 561 562 if ( c < 0x0e40 ) return false; 564 if ( c <= 0x0e45 ) return true; 565 566 if ( c < 0x0e81 ) return false; 568 if ( c <= 0x0e82 ) return true; 569 570 if ( c == 0x0e84 ) return true; 572 573 if ( c < 0x0e87 ) return false; 575 if ( c <= 0x0e88 ) return true; 576 577 if ( c == 0x0e8a ) return true; 579 580 if ( c == 0x0e8d ) return true; 582 583 if ( c < 0x0e94 ) return false; 585 if ( c <= 0x0e97 ) return true; 586 587 if ( c < 0x0e99 ) return false; 589 if ( c <= 0x0e9f ) return true; 590 591 if ( c < 0x0ea1 ) return false; 593 if ( c <= 0x0ea3 ) return true; 594 595 if ( c == 0x0ea5 ) return true; 597 598 if ( c == 0x0ea7 ) return true; 600 601 if ( c < 0x0eaa ) return false; 603 if ( c <= 0x0eab ) return true; 604 605 if ( c < 0x0ead ) return false; 607 if ( c <= 0x0eae ) return true; 608 609 if ( c == 0x0eb0 ) return true; 611 612 if ( c < 0x0eb2 ) return false; 614 if ( c <= 0x0eb3 ) return true; 615 616 if ( c == 0x0ebd ) return true; 618 619 if ( c < 0x0ec0 ) return false; 621 if ( c <= 0x0ec4 ) return true; 622 623 if ( c < 0x0f40 ) return false; 625 if ( c <= 0x0f47 ) return true; 626 627 if ( c < 0x0f49 ) return false; 629 if ( c <= 0x0f69 ) return true; 630 631 if ( c < 0x10a0 ) return false; 633 if ( c <= 0x10c5 ) return true; 634 635 if ( c < 0x10d0 ) return false; 637 if ( c <= 0x10f6 ) return true; 638 639 if ( c == 0x1100 ) return true; 641 642 if ( c < 0x1102 ) return false; 644 if ( c <= 0x1103 ) return true; 645 646 if ( c < 0x1105 ) return false; 648 if ( c <= 0x1107 ) return true; 649 650 if ( c == 0x1109 ) return true; 652 653 if ( c < 0x110b ) return false; 655 if ( c <= 0x110c ) return true; 656 657 if ( c < 0x110e ) return false; 659 if ( c <= 0x1112 ) return true; 660 661 if ( c == 0x113c ) return true; 663 664 if ( c == 0x113e ) return true; 666 667 if ( c == 0x1140 ) return true; 669 670 if ( c == 0x114c ) return true; 672 673 if ( c == 0x114e ) return true; 675 676 if ( c == 0x1150 ) return true; 678 679 if ( c < 0x1154 ) return false; 681 if ( c <= 0x1155 ) return true; 682 683 if ( c == 0x1159 ) return true; 685 686 if ( c < 0x115f ) return false; 688 if ( c <= 0x1161 ) return true; 689 690 if ( c == 0x1163 ) return true; 692 693 if ( c == 0x1165 ) return true; 695 696 if ( c == 0x1167 ) return true; 698 699 if ( c == 0x1169 ) return true; 701 702 if ( c < 0x116d ) return false; 704 if ( c <= 0x116e ) return true; 705 706 if ( c < 0x1172 ) return false; 708 if ( c <= 0x1173 ) return true; 709 710 if ( c == 0x1175 ) return true; 712 713 if ( c == 0x119e ) return true; 715 716 if ( c == 0x11a8 ) return true; 718 719 if ( c == 0x11ab ) return true; 721 722 if ( c < 0x11ae ) return false; 724 if ( c <= 0x11af ) return true; 725 726 if ( c < 0x11b7 ) return false; 728 if ( c <= 0x11b8 ) return true; 729 730 if ( c == 0x11ba ) return true; 732 733 if ( c < 0x11bc ) return false; 735 if ( c <= 0x11c2 ) return true; 736 737 if ( c == 0x11eb ) return true; 739 740 if ( c == 0x11f0 ) return true; 742 743 if ( c == 0x11f9 ) return true; 745 746 if ( c < 0x1e00 ) return false; 748 if ( c <= 0x1e9b ) return true; 749 750 if ( c < 0x1ea0 ) return false; 752 if ( c <= 0x1ef9 ) return true; 753 754 if ( c < 0x1f00 ) return false; 756 if ( c <= 0x1f15 ) return true; 757 758 if ( c < 0x1f18 ) return false; 760 if ( c <= 0x1f1d ) return true; 761 762 if ( c < 0x1f20 ) return false; 764 if ( c <= 0x1f45 ) return true; 765 766 if ( c < 0x1f48 ) return false; 768 if ( c <= 0x1f4d ) return true; 769 770 if ( c < 0x1f50 ) return false; 772 if ( c <= 0x1f57 ) return true; 773 774 if ( c == 0x1f59 ) return true; 776 777 if ( c == 0x1f5b ) return true; 779 780 if ( c == 0x1f5d ) return true; 782 783 if ( c < 0x1f5f ) return false; 785 if ( c <= 0x1f7d ) return true; 786 787 if ( c < 0x1f80 ) return false; 789 if ( c <= 0x1fb4 ) return true; 790 791 if ( c < 0x1fb6 ) return false; 793 if ( c <= 0x1fbc ) return true; 794 795 if ( c == 0x1fbe ) return true; 797 798 if ( c < 0x1fc2 ) return false; 800 if ( c <= 0x1fc4 ) return true; 801 802 if ( c < 0x1fc6 ) return false; 804 if ( c <= 0x1fcc ) return true; 805 806 if ( c < 0x1fd0 ) return false; 808 if ( c <= 0x1fd3 ) return true; 809 810 if ( c < 0x1fd6 ) return false; 812 if ( c <= 0x1fdb ) return true; 813 814 if ( c < 0x1fe0 ) return false; 816 if ( c <= 0x1fec ) return true; 817 818 if ( c < 0x1ff2 ) return false; 820 if ( c <= 0x1ff4 ) return true; 821 822 if ( c < 0x1ff6 ) return false; 824 if ( c <= 0x1ffc ) return true; 825 826 if ( c == 0x2126 ) return true; 828 829 if ( c < 0x212a ) return false; 831 if ( c <= 0x212b ) return true; 832 833 if ( c == 0x212e ) return true; 835 836 if ( c < 0x2180 ) return false; 838 if ( c <= 0x2182 ) return true; 839 840 if ( c < 0x3041 ) return false; 842 if ( c <= 0x3094 ) return true; 843 844 if ( c < 0x30a1 ) return false; 846 if ( c <= 0x30fa ) return true; 847 848 if ( c < 0x3105 ) return false; 850 if ( c <= 0x312c ) return true; 851 852 if ( c < 0xac00 ) return false; 854 if ( c <= 0xd7a3 ) return true; 855 856 return false; 857 } 858 859 860 863 public static boolean isXMLIdeographic (int c) { 864 if ( c == 0x3007 ) return true; 866 867 if ( c < 0x3021 ) return false; 869 if ( c <= 0x3029 ) return true; 870 871 if ( c < 0x4e00 ) return false; 873 if ( c <= 0x9fa5 ) return true; 874 875 return false; 876 } 877 878 879 882 public static boolean isXMLCombiningChar (int c) { 883 if ( c < 0x0300 ) return false; 885 if ( c <= 0x0345 ) return true; 886 887 if ( c < 0x0360 ) return false; 889 if ( c <= 0x0361 ) return true; 890 891 if ( c < 0x0483 ) return false; 893 if ( c <= 0x0486 ) return true; 894 895 if ( c < 0x0591 ) return false; 897 if ( c <= 0x05a1 ) return true; 898 899 if ( c < 0x05a3 ) return false; 901 if ( c <= 0x05b9 ) return true; 902 903 if ( c < 0x05bb ) return false; 905 if ( c <= 0x05bd ) return true; 906 907 if ( c == 0x05bf ) return true; 909 910 if ( c < 0x05c1 ) return false; 912 if ( c <= 0x05c2 ) return true; 913 914 if ( c == 0x05c4 ) return true; 916 917 if ( c < 0x064b ) return false; 919 if ( c <= 0x0652 ) return true; 920 921 if ( c == 0x0670 ) return true; 923 924 if ( c < 0x06d6 ) return false; 926 if ( c <= 0x06dc ) return true; 927 928 if ( c < 0x06dd ) return false; 930 if ( c <= 0x06df ) return true; 931 932 if ( c < 0x06e0 ) return false; 934 if ( c <= 0x06e4 ) return true; 935 936 if ( c < 0x06e7 ) return false; 938 if ( c <= 0x06e8 ) return true; 939 940 if ( c < 0x06ea ) return false; 942 if ( c <= 0x06ed ) return true; 943 944 if ( c < 0x0901 ) return false; 946 if ( c <= 0x0903 ) return true; 947 948 if ( c == 0x093c ) return true; 950 951 if ( c < 0x093e ) return false; 953 if ( c <= 0x094c ) return true; 954 955 if ( c == 0x094d ) return true; 957 958 if ( c < 0x0951 ) return false; 960 if ( c <= 0x0954 ) return true; 961 962 if ( c < 0x0962 ) return false; 964 if ( c <= 0x0963 ) return true; 965 966 if ( c < 0x0981 ) return false; 968 if ( c <= 0x0983 ) return true; 969 970 if ( c == 0x09bc ) return true; 972 973 if ( c == 0x09be ) return true; 975 976 if ( c == 0x09bf ) return true; 978 979 if ( c < 0x09c0 ) return false; 981 if ( c <= 0x09c4 ) return true; 982 983 if ( c < 0x09c7 ) return false; 985 if ( c <= 0x09c8 ) return true; 986 987 if ( c < 0x09cb ) return false; 989 if ( c <= 0x09cd ) return true; 990 991 if ( c == 0x09d7 ) return true; 993 994 if ( c < 0x09e2 ) return false; 996 if ( c <= 0x09e3 ) return true; 997 998 if ( c == 0x0a02 ) return true; 1000 1001 if ( c == 0x0a3c ) return true; 1003 1004 if ( c == 0x0a3e ) return true; 1006 1007 if ( c == 0x0a3f ) return true; 1009 1010 if ( c < 0x0a40 ) return false; 1012 if ( c <= 0x0a42 ) return true; 1013 1014 if ( c < 0x0a47 ) return false; 1016 if ( c <= 0x0a48 ) return true; 1017 1018 if ( c < 0x0a4b ) return false; 1020 if ( c <= 0x0a4d ) return true; 1021 1022 if ( c < 0x0a70 ) return false; 1024 if ( c <= 0x0a71 ) return true; 1025 1026 if ( c < 0x0a81 ) return false; 1028 if ( c <= 0x0a83 ) return true; 1029 1030 if ( c == 0x0abc ) return true; 1032 1033 if ( c < 0x0abe ) return false; 1035 if ( c <= 0x0ac5 ) return true; 1036 1037 if ( c < 0x0ac7 ) return false; 1039 if ( c <= 0x0ac9 ) return true; 1040 1041 if ( c < 0x0acb ) return false; 1043 if ( c <= 0x0acd ) return true; 1044 1045 if ( c < 0x0b01 ) return false; 1047 if ( c <= 0x0b03 ) return true; 1048 1049 if ( c == 0x0b3c ) return true; 1051 1052 if ( c < 0x0b3e ) return false; 1054 if ( c <= 0x0b43 ) return true; 1055 1056 if ( c < 0x0b47 ) return false; 1058 if ( c <= 0x0b48 ) return true; 1059 1060 if ( c < 0x0b4b ) return false; 1062 if ( c <= 0x0b4d ) return true; 1063 1064 if ( c < 0x0b56 ) return false; 1066 if ( c <= 0x0b57 ) return true; 1067 1068 if ( c < 0x0b82 ) return false; 1070 if ( c <= 0x0b83 ) return true; 1071 1072 if ( c < 0x0bbe ) return false; 1074 if ( c <= 0x0bc2 ) return true; 1075 1076 if ( c < 0x0bc6 ) return false; 1078 if ( c <= 0x0bc8 ) return true; 1079 1080 if ( c < 0x0bca ) return false; 1082 if ( c <= 0x0bcd ) return true; 1083 1084 if ( c == 0x0bd7 ) return true; 1086 1087 if ( c < 0x0c01 ) return false; 1089 if ( c <= 0x0c03 ) return true; 1090 1091 if ( c < 0x0c3e ) return false; 1093 if ( c <= 0x0c44 ) return true; 1094 1095 if ( c < 0x0c46 ) return false; 1097 if ( c <= 0x0c48 ) return true; 1098 1099 if ( c < 0x0c4a ) return false; 1101 if ( c <= 0x0c4d ) return true; 1102 1103 if ( c < 0x0c55 ) return false; 1105 if ( c <= 0x0c56 ) return true; 1106 1107 if ( c < 0x0c82 ) return false; 1109 if ( c <= 0x0c83 ) return true; 1110 1111 if ( c < 0x0cbe ) return false; 1113 if ( c <= 0x0cc4 ) return true; 1114 1115 if ( c < 0x0cc6 ) return false; 1117 if ( c <= 0x0cc8 ) return true; 1118 1119 if ( c < 0x0cca ) return false; 1121 if ( c <= 0x0ccd ) return true; 1122 1123 if ( c < 0x0cd5 ) return false; 1125 if ( c <= 0x0cd6 ) return true; 1126 1127 if ( c < 0x0d02 ) return false; 1129 if ( c <= 0x0d03 ) return true; 1130 1131 if ( c < 0x0d3e ) return false; 1133 if ( c <= 0x0d43 ) return true; 1134 1135 if ( c < 0x0d46 ) return false; 1137 if ( c <= 0x0d48 ) return true; 1138 1139 if ( c < 0x0d4a ) return false; 1141 if ( c <= 0x0d4d ) return true; 1142 1143 if ( c == 0x0d57 ) return true; 1145 1146 if ( c == 0x0e31 ) return true; 1148 1149 if ( c < 0x0e34 ) return false; 1151 if ( c <= 0x0e3a ) return true; 1152 1153 if ( c < 0x0e47 ) return false; 1155 if ( c <= 0x0e4e ) return true; 1156 1157 if ( c == 0x0eb1 ) return true; 1159 1160 if ( c < 0x0eb4 ) return false; 1162 if ( c <= 0x0eb9 ) return true; 1163 1164 if ( c < 0x0ebb ) return false; 1166 if ( c <= 0x0ebc ) return true; 1167 1168 if ( c < 0x0ec8 ) return false; 1170 if ( c <= 0x0ecd ) return true; 1171 1172 if ( c < 0x0f18 ) return false; 1174 if ( c <= 0x0f19 ) return true; 1175 1176 if ( c == 0x0f35 ) return true; 1178 1179 if ( c == 0x0f37 ) return true; 1181 1182 if ( c == 0x0f39 ) return true; 1184 1185 if ( c == 0x0f3e ) return true; 1187 1188 if ( c == 0x0f3f ) return true; 1190 1191 if ( c < 0x0f71 ) return false; 1193 if ( c <= 0x0f84 ) return true; 1194 1195 if ( c < 0x0f86 ) return false; 1197 if ( c <= 0x0f8b ) return true; 1198 1199 if ( c < 0x0f90 ) return false; 1201 if ( c <= 0x0f95 ) return true; 1202 1203 if ( c == 0x0f97 ) return true; 1205 1206 if ( c < 0x0f99 ) return false; 1208 if ( c <= 0x0fad ) return true; 1209 1210 if ( c < 0x0fb1 ) return false; 1212 if ( c <= 0x0fb7 ) return true; 1213 1214 if ( c == 0x0fb9 ) return true; 1216 1217 if ( c < 0x20d0 ) return false; 1219 if ( c <= 0x20dc ) return true; 1220 1221 if ( c == 0x20e1 ) return true; 1223 1224 if ( c < 0x302a ) return false; 1226 if ( c <= 0x302f ) return true; 1227 1228 if ( c == 0x3099 ) return true; 1230 1231 if ( c == 0x309a ) return true; 1233 1234 return false; 1235 } 1236 1237 1238 1241 public static boolean isXMLDigit (int c) { 1242 if ( c < 0x0030 ) return false; 1244 if ( c <= 0x0039 ) return true; 1245 1246 if ( c < 0x0660 ) return false; 1248 if ( c <= 0x0669 ) return true; 1249 1250 if ( c < 0x06f0 ) return false; 1252 if ( c <= 0x06f9 ) return true; 1253 1254 if ( c < 0x0966 ) return false; 1256 if ( c <= 0x096f ) return true; 1257 1258 if ( c < 0x09e6 ) return false; 1260 if ( c <= 0x09ef ) return true; 1261 1262 if ( c < 0x0a66 ) return false; 1264 if ( c <= 0x0a6f ) return true; 1265 1266 if ( c < 0x0ae6 ) return false; 1268 if ( c <= 0x0aef ) return true; 1269 1270 if ( c < 0x0b66 ) return false; 1272 if ( c <= 0x0b6f ) return true; 1273 1274 if ( c < 0x0be7 ) return false; 1276 if ( c <= 0x0bef ) return true; 1277 1278 if ( c < 0x0c66 ) return false; 1280 if ( c <= 0x0c6f ) return true; 1281 1282 if ( c < 0x0ce6 ) return false; 1284 if ( c <= 0x0cef ) return true; 1285 1286 if ( c < 0x0d66 ) return false; 1288 if ( c <= 0x0d6f ) return true; 1289 1290 if ( c < 0x0e50 ) return false; 1292 if ( c <= 0x0e59 ) return true; 1293 1294 if ( c < 0x0ed0 ) return false; 1296 if ( c <= 0x0ed9 ) return true; 1297 1298 if ( c < 0x0f20 ) return false; 1300 if ( c <= 0x0f29 ) return true; 1301 1302 return false; 1303 } 1304 1305 1306 1309 public static boolean isXMLExtender (int c) { 1310 if ( c == 0x00b7 ) return true; 1312 1313 if ( c == 0x02d0 ) return true; 1315 1316 if ( c == 0x02d1 ) return true; 1318 1319 if ( c == 0x0387 ) return true; 1321 1322 if ( c == 0x0640 ) return true; 1324 1325 if ( c == 0x0e46 ) return true; 1327 1328 if ( c == 0x0ec6 ) return true; 1330 1331 if ( c == 0x3005 ) return true; 1333 1334 if ( c < 0x3031 ) return false; 1336 if ( c <= 0x3035 ) return true; 1337 1338 if ( c < 0x309d ) return false; 1340 if ( c <= 0x309e ) return true; 1341 1342 if ( c < 0x30fc ) return false; 1344 if ( c <= 0x30fe ) return true; 1345 1346 return false; 1347 } 1348 1349 1350 1351 1354 public static boolean isXMLNCNameChar (int c) { 1355 return ( ( isXMLLetter (c) ) 1356 || ( isXMLDigit (c) ) 1357 || ( c == '.' ) 1358 || ( c == '-' ) 1359 || ( c == '_' ) 1360 || ( isXMLCombiningChar (c) ) 1361 || ( isXMLExtender (c) ) ); 1362 } 1363 1364 1367 public static boolean isXMLNCNameStartChar (int c) { 1368 return ( ( isXMLLetter (c) ) 1369 || ( c == '_' ) ); 1370 } 1371 1372 1373 1376 public static boolean isXMLPubidLiteral (char c) { 1377 1380 if ( c == ' ' ) return true; 1382 1383 if ( c == '\r' ) return true; 1385 1386 if ( c == '\n' ) return true; 1388 1389 if ( c == '-' ) return true; 1391 1392 if ( c == '\'' ) return true; 1394 1395 if ( c == '(' ) return true; 1397 1398 if ( c == ')' ) return true; 1400 1401 if ( c == '+' ) return true; 1403 1404 if ( c == ',' ) return true; 1406 1407 if ( c == '.' ) return true; 1409 1410 if ( c == '/' ) return true; 1412 1413 if ( c == ':' ) return true; 1415 1416 if ( c == '=' ) return true; 1418 1419 if ( c == '?' ) return true; 1421 1422 if ( c == ';' ) return true; 1424 1425 if ( c == '!' ) return true; 1427 1428 if ( c == '*' ) return true; 1430 1431 if ( c == '#' ) return true; 1433 1434 if ( c == '@' ) return true; 1436 1437 if ( c == '$' ) return true; 1439 1440 if ( c == '_' ) return true; 1442 1443 if ( c == '%' ) return true; 1445 1446 if ( c < '0' ) return false; 1448 if ( c <= '9' ) return true; 1449 1450 if ( c < 'A' ) return false; 1452 if ( c <= 'Z' ) return true; 1453 1454 if ( c < 'a' ) return false; 1456 if ( c <= 'z' ) return true; 1457 1458 return false; 1459 } 1460 1461} 1462 | Popular Tags |