[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-dev
Subject:    cvs commit: xml-batik/sources/org/apache/batik/xml/scanner AbstractScanner.java DocumentScanner.java
From:       hillion () apache ! org
Date:       2001-03-30 15:59:04
[Download RAW message or body]

hillion     01/03/30 07:59:04

  Modified:    sources/org/apache/batik/apps/svgbrowser
                        JSVGViewerFrame.java
               sources/org/apache/batik/dom/util DOMUtilities.java
               sources/org/apache/batik/parser
                        FragmentIdentifierParser.java
               sources/org/apache/batik/transcoder/svg2svg
                        OutputManager.java
               sources/org/apache/batik/xml/scanner AbstractScanner.java
                        DocumentScanner.java
  Added:       sources/org/apache/batik/xml XMLCharacters.java
                        XMLUtilities.java
  Removed:     sources/org/apache/batik/util XMLCharacters.java
                        XMLUtilities.java
  Log:
  Moved XMLCharacter and XMLUtilities moved to batik/xml
  
  Revision  Changes    Path
  1.16      +3 -3      xml-batik/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
  
  Index: JSVGViewerFrame.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JSVGViewerFrame.java	2001/03/30 15:13:06	1.15
  +++ JSVGViewerFrame.java	2001/03/30 15:59:03	1.16
  @@ -103,8 +103,6 @@
   
   import org.apache.batik.transcoder.print.PrintTranscoder;
   
  -import org.apache.batik.util.XMLUtilities;
  -
   import org.apache.batik.util.gui.DOMViewer;
   import org.apache.batik.util.gui.LanguageDialog;
   import org.apache.batik.util.gui.LocationBar;
  @@ -120,6 +118,8 @@
   import org.apache.batik.util.gui.resource.ResourceManager;
   import org.apache.batik.util.gui.resource.ToolBarFactory;
   
  +import org.apache.batik.xml.XMLUtilities;
  +
   import org.w3c.dom.css.ViewCSS;
   
   import org.w3c.dom.svg.SVGDocument;
  @@ -128,7 +128,7 @@
    * This class represents a SVG viewer swing frame.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: JSVGViewerFrame.java,v 1.15 2001/03/30 15:13:06 hillion Exp $
  + * @version $Id: JSVGViewerFrame.java,v 1.16 2001/03/30 15:59:03 hillion Exp $
    */
   public class JSVGViewerFrame
       extends    JFrame
  
  
  
  1.5       +2 -2      xml-batik/sources/org/apache/batik/dom/util/DOMUtilities.java
  
  Index: DOMUtilities.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/util/DOMUtilities.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DOMUtilities.java	2001/02/06 14:17:03	1.4
  +++ DOMUtilities.java	2001/03/30 15:59:03	1.5
  @@ -11,7 +11,7 @@
   import java.io.IOException;
   import java.io.Writer;
   
  -import org.apache.batik.util.XMLUtilities;
  +import org.apache.batik.xml.XMLUtilities;
   
   import org.w3c.dom.Attr;
   import org.w3c.dom.Document;
  @@ -25,7 +25,7 @@
    * A collection of utility functions for the DOM.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: DOMUtilities.java,v 1.4 2001/02/06 14:17:03 hillion Exp $
  + * @version $Id: DOMUtilities.java,v 1.5 2001/03/30 15:59:03 hillion Exp $
    */
   public class DOMUtilities extends XMLUtilities {
       /**
  
  
  
  1.5       +2 -2      xml-batik/sources/org/apache/batik/parser/FragmentIdentifierParser.java
  
  Index: FragmentIdentifierParser.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/parser/FragmentIdentifierParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FragmentIdentifierParser.java	2001/03/28 09:24:12	1.4
  +++ FragmentIdentifierParser.java	2001/03/30 15:59:03	1.5
  @@ -10,14 +10,14 @@
   
   import java.io.Reader;
   
  -import org.apache.batik.util.XMLUtilities;
  +import org.apache.batik.xml.XMLUtilities;
   
   /**
    * This class represents an event-based parser for the SVG
    * fragment identifiers.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: FragmentIdentifierParser.java,v 1.4 2001/03/28 09:24:12 hillion Exp $
  + * @version $Id: FragmentIdentifierParser.java,v 1.5 2001/03/30 15:59:03 hillion Exp $
    */
   public class FragmentIdentifierParser extends AbstractParser {
       
  
  
  
  1.3       +2 -2      xml-batik/sources/org/apache/batik/transcoder/svg2svg/OutputManager.java
  
  Index: OutputManager.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/transcoder/svg2svg/OutputManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OutputManager.java	2001/02/06 15:09:37	1.2
  +++ OutputManager.java	2001/03/30 15:59:03	1.3
  @@ -14,14 +14,14 @@
   import java.util.LinkedList;
   import java.util.List;
   
  -import org.apache.batik.util.XMLUtilities;
  +import org.apache.batik.xml.XMLUtilities;
   import org.apache.batik.xml.scanner.DocumentScanner;
   
   /**
    * This class is responsible of the output of XML constructs.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: OutputManager.java,v 1.2 2001/02/06 15:09:37 hillion Exp $
  + * @version $Id: OutputManager.java,v 1.3 2001/03/30 15:59:03 hillion Exp $
    */
   public class OutputManager {
   
  
  
  
  1.1                  xml-batik/sources/org/apache/batik/xml/XMLCharacters.java
  
  Index: XMLCharacters.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.xml;
  
  /**
   * This class contains the definitions of the arrays used to find
   * the type of the characters found in an XML document.
   *
   * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
   * @version $Id: XMLCharacters.java,v 1.1 2001/03/30 15:59:04 hillion Exp $
   */
  
  public class XMLCharacters {
      /**
      * The bit array representing the first character of an XML name.
      */
      public final static int[] NAME_FIRST_CHARACTER = {
          0,67108864,-2013265922,134217726,0,0,-8388609,-8388609,-1,2146697215,
          -514,2147483647,-1,-1,-8177,-63832065,16777215,0,-65536,-1,-1,
          -134217217,3,0,0,0,0,0,-10432,-5,1417641983,1048573,-8194,-1,
          -536936449,-1,-65533,-1,-58977,54513663,0,-131072,41943039,-2,127,0,
          -65536,460799,0,134217726,2046,-131072,-1,2097151999,3112959,96,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,-32,603979775,-16777216,3,-417824,
          63307263,-1342177280,196611,-423968,57540095,1577058304,1835008,
          -282656,602799615,0,1,-417824,600702463,-1342177280,3,-700594208,
          62899992,0,0,-139296,66059775,0,3,-139296,66059775,1073741824,3,
          -139296,67108351,0,3,0,0,0,0,-2,884735,63,0,-17816170,537750702,31,0,
          0,0,-257,1023,0,0,0,0,0,0,0,0,0,-1,-65473,8388607,514797,1342177280,
          -2110697471,2908843,1073741824,-176109312,7,33622016,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,268435455,-1,-1,
          67108863,1061158911,-1,-1426112705,1073741823,-1,1608515583,
          265232348,534519807,0,0,0,0,0,0,0,0,0,19520,0,0,7,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,128,1022,-2,-1,2097151,-2,-1,134217727,-32,8191,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          };
  
      /**
      * The bit array representing a character compositing an XML name.
      */
      public final static int[] NAME_CHARACTER = {
          0,134176768,-2013265922,134217726,0,8388608,-8388609,-8388609,-1,
          2146697215,-514,2147483647,-1,-1,-8177,-63832065,16777215,0,-65536,
          -1,-1,-134217217,196611,0,-1,-1,63,3,-10304,-5,1417641983,1048573,
          -8194,-1,-536936449,-1,-65413,-1,-58977,54513663,0,-131072,41943039,
          -2,-130945,-1140850693,-65514,460799,0,134217726,524287,-64513,-1,
          2097151999,-1081345,67059199,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-18,
          -201326593,-14794753,65487,-417810,-741999105,-1333773921,262095,
          -423964,-747766273,1577073031,2097088,-282642,-202506753,15295,65473,
          -417810,-204603905,-1329579633,65475,-700594196,-1010841832,8404423,
          65408,-139282,-1007682049,6307295,65475,-139284,-1007682049,
          1080049119,65475,-139284,-1006633473,8404431,65475,0,0,0,0,-2,
          134184959,67076095,0,-17816170,1006595246,67059551,0,50331648,
          -1029700609,-257,-130049,-21032993,50216959,0,0,0,0,0,0,0,-1,-65473,
          8388607,514797,1342177280,-2110697471,2908843,1073741824,-176109312,
          7,33622016,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,
          -1,-1,-1,268435455,-1,-1,67108863,1061158911,-1,-1426112705,
          1073741823,-1,1608515583,265232348,534519807,0,0,0,0,0,0,536805376,2,
          0,19520,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,4128766,-2,-1,1713373183,
          -2,-1,2013265919,-32,8191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,63,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,15,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,
          };
  
      /**
      * The bit array representing a valid XML character in the unicode range [0-FFFF].
      */
      public final static int[] XML_CHARACTER = {
          9728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
          0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
          -1,-1,-1,-1,1073741823,
          };
  
      /**
      * The bit array representing the valid XML public ID characters.
      */
      public final static int[] PUBLIC_ID_CHARACTER = {
          9216,-1342177349,-2013265921,134217726,
          };
  
      /**
      * The bit array representing the valid XML version characters.
      */
      public final static int[] VERSION_CHARACTER = {
          0,134176768,-2013265922,134217726,
          };
  
      /**
      * The bit array representing an alphabetic character.
      */
      public final static int[] ALPHABETIC_CHARACTER = {
          0,0,134217726,134217726,
          };
  
      /**
       * This class does not need to be instantiated.
       */
      protected XMLCharacters() {
      }
  }
  
  
  
  1.1                  xml-batik/sources/org/apache/batik/xml/XMLUtilities.java
  
  Index: XMLUtilities.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.xml;
  
  import java.io.ByteArrayInputStream;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.io.IOException;
  import java.io.PushbackInputStream;
  import java.io.Reader;
  
  import java.util.HashMap;
  import java.util.Map;
  
  /**
   * A collection of utility functions for XML.
   *
   * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
   * @version $Id: XMLUtilities.java,v 1.1 2001/03/30 15:59:04 hillion Exp $
   */
  public class XMLUtilities extends XMLCharacters {
  
      /**
       * This class does not need to be instantiated.
       */
      protected XMLUtilities() {
      }
  
      /**
       * Tests whether the given character is a valid space.
       */
      public static boolean isXMLSpace(char c) {
        return (c <= 0x0020) &&
               (((((1L << 0x0009) |
                   (1L << 0x000A) |
                   (1L << 0x000D) |
                   (1L << 0x0020)) >> c) & 1L) != 0);
      }
  
      /**
       * Tests whether the given character is usable as the
       * first character of an XML name.
       */
      public static boolean isXMLNameFirstCharacter(char c) {
  	return (NAME_FIRST_CHARACTER[c / 32] & (1 << (c % 32))) != 0;
      }
  
      /**
       * Tests whether the given character is a valid XML name character.
       */
      public static boolean isXMLNameCharacter(char c) {
  	return (NAME_CHARACTER[c / 32] & (1 << (c % 32))) != 0;
      }
  
      /**
       * Tests whether the given 32 bits character is valid in XML documents.
       */
      public static boolean isXMLCharacter(int c) {
  	return (c >= 0x10000 && c <= 0x10ffff) ||
  	    (XML_CHARACTER[c / 32] & (1 << (c % 32))) != 0;
      }
  
      /**
       * Tests whether the given character is a valid XML public ID character.
       */
      public static boolean isXMLPublicIdCharacter(char c) {
  	return (c < 128) &&
              (PUBLIC_ID_CHARACTER[c / 32] & (1 << (c % 32))) != 0;
      }
  
      /**
       * Tests whether the given character is a valid XML version character.
       */
      public static boolean isXMLVersionCharacter(char c) {
  	return (c < 128) &&
              (VERSION_CHARACTER[c / 32] & (1 << (c % 32))) != 0;
      }
  
      /**
       * Tests whether the given character is a valid aphabetic character.
       */
      public static boolean isXMLAlphabeticCharacter(char c) {
  	return (c < 128) &&
              (ALPHABETIC_CHARACTER[c / 32] & (1 << (c % 32))) != 0;
      }
  
      /**
       * Creates a Reader initialized to scan the characters in the given
       * XML document's InputStream.
       * @param is The input stream positionned at the beginning of an
       *        XML document.
       * @return a Reader positionned at the beginning of the XML document
       *         It is created from an encoding figured out from the first
       *         few bytes of the document. As a consequence the given
       *         input stream is not positionned anymore at the beginning
       *         of the document when this method returns.
       */
      public static Reader createXMLDocumentReader(InputStream is)
          throws IOException {
          PushbackInputStream pbis = new PushbackInputStream(is, 128);
          byte[] buf = new byte[4];
  
          int len = pbis.read(buf);
          if (len > 0) {
              pbis.unread(buf, 0, len);
          }
  
          if (len == 4) {
              switch (buf[0] & 0x00FF) {
              case 0:
                  if (buf[1] == 0x003c && buf[2] == 0x0000 && buf[3] == 0x003f) {
                      return new InputStreamReader(pbis, "UnicodeBig");
                  }
                  break;
  
              case '<':
                  switch (buf[1] & 0x00FF) {
                  case 0:
                      if (buf[2] == 0x003f && buf[3] == 0x0000) {
                          return new InputStreamReader(pbis, "UnicodeLittle");
                      }
                      break;
  
                  case '?':
                      if (buf[2] == 'x' && buf[3] == 'm') {
                          Reader r = createXMLDeclarationReader(pbis, "UTF8");
                          String enc = getXMLDeclarationEncoding(r, "UTF8");
                          return new InputStreamReader(pbis, enc);
                      }
                  }
                  break;
  
              case 0x004C:
                  if (buf[1] == 0x006f &&
                      (buf[2] & 0x00FF) == 0x00a7 &&
                      (buf[3] & 0x00FF) == 0x0094) {
                      Reader r = createXMLDeclarationReader(pbis, "CP037");
                      String enc = getXMLDeclarationEncoding(r, "CP037");
                      return new InputStreamReader(pbis, enc);
                  }
                  break;
  
              case 0x00FE:
                  if ((buf[1] & 0x00FF) == 0x00FF) {
                      return new InputStreamReader(pbis, "Unicode");
                  }
                  break;
  
              case 0x00FF:
                  if ((buf[1] & 0x00FF) == 0x00FE) {
                      return new InputStreamReader(pbis, "Unicode");
                  }
              }
          }
  
          return new InputStreamReader(pbis, "UTF8");
      }
  
      /**
       * Creates a reader from the given input stream and encoding.
       * This method assumes the input stream working buffer is at least
       * 128 byte long. The input stream is restored before this method
       * returns. The 4 first bytes are skipped before creating the reader.
       */
      protected static Reader createXMLDeclarationReader(PushbackInputStream pbis,
                                                         String enc)
          throws IOException {
          byte[] buf = new byte[128];
          int len = pbis.read(buf);
  
          if (len > 0) {
              pbis.unread(buf, 0, len);
          }
  
          return new InputStreamReader(new ByteArrayInputStream(buf, 4, len), enc);
      }
  
      /**
       * Reads an XML declaration to get the encoding declaration value.
       * @param r a reader positionned just after '<?xm'.
       * @param e the encoding to return by default or on error.
       */
      protected static String getXMLDeclarationEncoding(Reader r, String e)
          throws IOException {
          int c;
  
          if ((c = r.read()) != 'l') {
              return e;
          }
  
          if (!isXMLSpace((char)(c = r.read()))) {
              return e;
          }
  
          while (isXMLSpace((char)(c = r.read())));
              
          if (c != 'v') {
              return e;
          }
          if ((c = r.read()) != 'e') {
              return e;
          }
          if ((c = r.read()) != 'r') {
              return e;
          }
          if ((c = r.read()) != 's') {
              return e;
          }
          if ((c = r.read()) != 'i') {
              return e;
          }
          if ((c = r.read()) != 'o') {
              return e;
          }
          if ((c = r.read()) != 'n') {
              return e;
          }
               
          c = r.read();
          while (isXMLSpace((char)c)) {
              c = r.read();
          }
  
          if (c != '=') {
              return e;
          }
  
          while (isXMLSpace((char)(c = r.read())));
              
          if (c != '"' && c != '\'') {
              return e;
          }
          char sc = (char)c;
  
          for (;;) {
              c = r.read();
              if (!isXMLVersionCharacter((char)c)) {
                  return e;
              }
              if (c == sc) {
                  break;
              }
          }
  
          if (!isXMLSpace((char)(c = r.read()))) {
              return e;
          }
          while (isXMLSpace((char)(c = r.read())));
  
          if (c != 'e') {
              return e;
          }
          if ((c = r.read()) != 'n') {
              return e;
          }
          if ((c = r.read()) != 'c') {
              return e;
          }
          if ((c = r.read()) != 'o') {
              return e;
          }
          if ((c = r.read()) != 'd') {
              return e;
          }
          if ((c = r.read()) != 'i') {
              return e;
          }
          if ((c = r.read()) != 'n') {
              return e;
          }
          if ((c = r.read()) != 'g') {
              return e;
          }
  
          c = r.read();
          while (isXMLSpace((char)c)) {
              c = r.read();
          }
  
          if (c != '=') {
              return e;
          }
  
          while (isXMLSpace((char)(c = r.read())));
              
          if (c != '"' && c != '\'') {
              return e;
          }
          sc = (char)c;
  
          StringBuffer enc = new StringBuffer();
          for (;;) {
              if (c == -1) {
                  return e;
              }
              if (c == sc) {
                  return encodingToJavaEncoding(enc.toString(), e);
              }
              enc.append((char)c);
          }
      }
  
      /**
       * Converts the given standard encoding representation to the
       * corresponding Java encoding string.
       * @param e the encoding string to convert.
       * @param de the encoding string if no corresponding encoding was found.
       */
      public static String encodingToJavaEncoding(String e, String de) {
          String result = (String)ENCODINGS.get(e.toUpperCase());
          return (result == null) ? de : result;
      }
  
      /**
       * The table used to convert the encoding names.
       */
      protected static Map ENCODINGS = new HashMap();
      static {
          ENCODINGS.put("UTF-8",           "UTF8");
          ENCODINGS.put("UTF-16",          "Unicode");
          ENCODINGS.put("US-ASCII",        "ASCII");
  
          ENCODINGS.put("ISO-8859-1",      "8859_1");
          ENCODINGS.put("ISO-8859-2",      "8859_2");
          ENCODINGS.put("ISO-8859-3",      "8859_3");
          ENCODINGS.put("ISO-8859-4",      "8859_4");
          ENCODINGS.put("ISO-8859-5",      "8859_5");
          ENCODINGS.put("ISO-8859-6",      "8859_6");
          ENCODINGS.put("ISO-8859-7",      "8859_7");
          ENCODINGS.put("ISO-8859-8",      "8859_8");
          ENCODINGS.put("ISO-8859-9",      "8859_9");
          ENCODINGS.put("ISO-2022-JP",     "JIS");
  
          ENCODINGS.put("WINDOWS-31J",     "MS932");
          ENCODINGS.put("EUC-JP",          "EUCJIS");
          ENCODINGS.put("GB2312",          "GB2312");
          ENCODINGS.put("BIG5",            "Big5");
          ENCODINGS.put("EUC-KR",          "KSC5601");
          ENCODINGS.put("ISO-2022-KR",     "ISO2022KR");
          ENCODINGS.put("KOI8-R",          "KOI8_R");
  
          ENCODINGS.put("EBCDIC-CP-US",    "CP037");
          ENCODINGS.put("EBCDIC-CP-CA",    "CP037");
          ENCODINGS.put("EBCDIC-CP-NL",    "CP037");
  	ENCODINGS.put("EBCDIC-CP-WT",    "CP037");
          ENCODINGS.put("EBCDIC-CP-DK",    "CP277");
          ENCODINGS.put("EBCDIC-CP-NO",    "CP277");
          ENCODINGS.put("EBCDIC-CP-FI",    "CP278");
          ENCODINGS.put("EBCDIC-CP-SE",    "CP278");
          ENCODINGS.put("EBCDIC-CP-IT",    "CP280");
          ENCODINGS.put("EBCDIC-CP-ES",    "CP284");
          ENCODINGS.put("EBCDIC-CP-GB",    "CP285");
          ENCODINGS.put("EBCDIC-CP-FR",    "CP297");
          ENCODINGS.put("EBCDIC-CP-AR1",   "CP420");
          ENCODINGS.put("EBCDIC-CP-HE",    "CP424");
          ENCODINGS.put("EBCDIC-CP-BE",    "CP500");
          ENCODINGS.put("EBCDIC-CP-CH",    "CP500");
          ENCODINGS.put("EBCDIC-CP-ROECE", "CP870");
          ENCODINGS.put("EBCDIC-CP-YU",    "CP870");
          ENCODINGS.put("EBCDIC-CP-IS",    "CP871");
          ENCODINGS.put("EBCDIC-CP-AR2",   "CP918");
  
          ENCODINGS.put("CP1252",          "CP1252");
      }
  }
  
  
  
  1.3       +3 -2      xml-batik/sources/org/apache/batik/xml/scanner/AbstractScanner.java
  
  Index: AbstractScanner.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/xml/scanner/AbstractScanner.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractScanner.java	2001/01/23 09:30:33	1.2
  +++ AbstractScanner.java	2001/03/30 15:59:04	1.3
  @@ -18,13 +18,14 @@
   import org.apache.batik.i18n.LocalizableSupport;
   
   import org.apache.batik.util.InputBuffer;
  -import org.apache.batik.util.XMLUtilities;
   
  +import org.apache.batik.xml.XMLUtilities;
  +
   /**
    * This class contains the basic methods needed by an XML scanners.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: AbstractScanner.java,v 1.2 2001/01/23 09:30:33 hillion Exp $
  + * @version $Id: AbstractScanner.java,v 1.3 2001/03/30 15:59:04 hillion Exp $
    */
   public class AbstractScanner implements Localizable {
   
  
  
  
  1.3       +2 -2      xml-batik/sources/org/apache/batik/xml/scanner/DocumentScanner.java
  
  Index: DocumentScanner.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/xml/scanner/DocumentScanner.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DocumentScanner.java	2001/01/23 09:30:33	1.2
  +++ DocumentScanner.java	2001/03/30 15:59:04	1.3
  @@ -11,7 +11,7 @@
   import java.io.IOException;
   import java.io.Reader;
   
  -import org.apache.batik.util.XMLUtilities;
  +import org.apache.batik.xml.XMLUtilities;
   
   /**
    * This class represents a low-level lexical scanner for XML documents.
  @@ -19,7 +19,7 @@
    * character references management.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: DocumentScanner.java,v 1.2 2001/01/23 09:30:33 hillion Exp $
  + * @version $Id: DocumentScanner.java,v 1.3 2001/03/30 15:59:04 hillion Exp $
    */
   public class DocumentScanner extends AbstractScanner {
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic