< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java

Print this page


   1 /*
   2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Nov 2017
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *     http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xalan.internal.xsltc.compiler;
  23 


  50 import jdk.xml.internal.JdkXmlFeatures;
  51 import jdk.xml.internal.JdkXmlUtils;
  52 import jdk.xml.internal.SecuritySupport;
  53 import org.xml.sax.Attributes;
  54 import org.xml.sax.ContentHandler;
  55 import org.xml.sax.InputSource;
  56 import org.xml.sax.Locator;
  57 import org.xml.sax.SAXException;
  58 import org.xml.sax.SAXNotRecognizedException;
  59 import org.xml.sax.SAXNotSupportedException;
  60 import org.xml.sax.SAXParseException;
  61 import org.xml.sax.XMLReader;
  62 import org.xml.sax.helpers.AttributesImpl;
  63 
  64 /**
  65  * @author Jacek Ambroziak
  66  * @author Santiago Pericas-Geertsen
  67  * @author G. Todd Miller
  68  * @author Morten Jorgensen
  69  * @author Erwin Bolwidt <ejb@klomp.org>

  70  */
  71 public class Parser implements Constants, ContentHandler {
  72 
  73     private static final String XSL = "xsl";           // standard prefix
  74     private static final String TRANSLET = "translet"; // extension prefix
  75 
  76     private Locator _locator = null;
  77 
  78     private XSLTC _xsltc;                  // Reference to the compiler object.
  79     private XPathParser _xpathParser;      // Reference to the XPath parser.
  80     private ArrayList<ErrorMsg> _errors;   // Contains all compilation errors
  81     private ArrayList<ErrorMsg> _warnings; // Contains all compilation warnings
  82 
  83     private Map<String, String>   _instructionClasses; // Maps instructions to classes
  84     private Map<String, String[]> _instructionAttrs;  // reqd and opt attrs
  85     private Map<String, QName>    _qNames;
  86     private Map<String, Map<String, QName>> _namespaces;
  87     private QName       _useAttributeSets;
  88     private QName       _excludeResultPrefixes;
  89     private QName       _extensionElementPrefixes;


   1 /*
   2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *     http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xalan.internal.xsltc.compiler;
  22 


  49 import jdk.xml.internal.JdkXmlFeatures;
  50 import jdk.xml.internal.JdkXmlUtils;
  51 import jdk.xml.internal.SecuritySupport;
  52 import org.xml.sax.Attributes;
  53 import org.xml.sax.ContentHandler;
  54 import org.xml.sax.InputSource;
  55 import org.xml.sax.Locator;
  56 import org.xml.sax.SAXException;
  57 import org.xml.sax.SAXNotRecognizedException;
  58 import org.xml.sax.SAXNotSupportedException;
  59 import org.xml.sax.SAXParseException;
  60 import org.xml.sax.XMLReader;
  61 import org.xml.sax.helpers.AttributesImpl;
  62 
  63 /**
  64  * @author Jacek Ambroziak
  65  * @author Santiago Pericas-Geertsen
  66  * @author G. Todd Miller
  67  * @author Morten Jorgensen
  68  * @author Erwin Bolwidt <ejb@klomp.org>
  69  * @LastModified: Nov 2017
  70  */
  71 public class Parser implements Constants, ContentHandler {
  72 
  73     private static final String XSL = "xsl";           // standard prefix
  74     private static final String TRANSLET = "translet"; // extension prefix
  75 
  76     private Locator _locator = null;
  77 
  78     private XSLTC _xsltc;                  // Reference to the compiler object.
  79     private XPathParser _xpathParser;      // Reference to the XPath parser.
  80     private ArrayList<ErrorMsg> _errors;   // Contains all compilation errors
  81     private ArrayList<ErrorMsg> _warnings; // Contains all compilation warnings
  82 
  83     private Map<String, String>   _instructionClasses; // Maps instructions to classes
  84     private Map<String, String[]> _instructionAttrs;  // reqd and opt attrs
  85     private Map<String, QName>    _qNames;
  86     private Map<String, Map<String, QName>> _namespaces;
  87     private QName       _useAttributeSets;
  88     private QName       _excludeResultPrefixes;
  89     private QName       _extensionElementPrefixes;


< prev index next >