jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java
author lana
Tue, 18 Mar 2014 17:49:48 -0700
changeset 23377 2af1ddf102a4
parent 22418 1ee8fd0184d1
child 25264 040625ce9b72
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     1
/*
22139
f4b2aa462b46 8029236: Update copyright year to match last edit in jdk8 jaxp repository for 2013
joehw
parents: 21467
diff changeset
     2
 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     4
 *
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    10
 *
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    15
 * accompanied this code).
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    16
 *
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    20
 *
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    23
 * questions.
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    24
 */
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    25
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    26
package com.sun.org.apache.xalan.internal;
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    27
17534
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
    28
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    29
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    30
/**
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    31
 * Commonly used constants.
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    32
 *
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    33
 * @author Huizhe Wang, Oracle
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    34
 *
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    35
 * @version $Id: Constants.java,v 1.14 2011-06-07 04:39:40 joehw Exp $
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    36
 */
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    37
public final class XalanConstants {
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    38
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    39
    //
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    40
    // Constants
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
    41
    //
20968
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    42
    //Xerces security manager
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    43
    public static final String SECURITY_MANAGER =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    44
            "http://apache.org/xml/properties/security-manager";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    45
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    46
    //
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    47
    // Implementation limits: API properties
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    48
    //
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    49
    /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    50
    public static final String ORACLE_JAXP_PROPERTY_PREFIX =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    51
        "http://www.oracle.com/xml/jaxp/properties/";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    52
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    53
     * JDK entity expansion limit; Note that the existing system property
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    54
     * "entityExpansionLimit" with no prefix is still observed
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    55
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    56
    public static final String JDK_ENTITY_EXPANSION_LIMIT =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    57
            ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    58
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    59
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    60
     * JDK element attribute limit; Note that the existing system property
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    61
     * "elementAttributeLimit" with no prefix is still observed
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    62
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    63
    public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    64
            ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    65
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    66
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    67
     * JDK maxOccur limit; Note that the existing system property
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    68
     * "maxOccurLimit" with no prefix is still observed
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    69
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    70
    public static final String JDK_MAX_OCCUR_LIMIT =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    71
            ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    72
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    73
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    74
     * JDK total entity size limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    75
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    76
    public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    77
            ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    78
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    79
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    80
     * JDK maximum general entity size limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    81
     */
22418
1ee8fd0184d1 8028111: XML readers share the same entity expansion counter
joehw
parents: 22139
diff changeset
    82
    public static final String JDK_GENERAL_ENTITY_SIZE_LIMIT =
20968
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    83
            ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    84
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    85
     * JDK maximum parameter entity size limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    86
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    87
    public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    88
            ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    89
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    90
     * JDK maximum XML name limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    91
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    92
    public static final String JDK_XML_NAME_LIMIT =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    93
            ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    94
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    95
     * JDK property indicating whether the parser shall print out entity
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    96
     * count information
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    97
     * Value: a string "yes" means print, "no" or any other string means not.
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    98
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
    99
    public static final String JDK_ENTITY_COUNT_INFO =
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   100
            ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   101
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   102
    //
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   103
    // Implementation limits: corresponding System Properties of the above
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   104
    // API properties
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   105
    //
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   106
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   107
     * JDK entity expansion limit; Note that the existing system property
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   108
     * "entityExpansionLimit" with no prefix is still observed
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   109
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   110
    public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   111
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   112
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   113
     * JDK element attribute limit; Note that the existing system property
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   114
     * "elementAttributeLimit" with no prefix is still observed
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   115
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   116
    public static final String SP_ELEMENT_ATTRIBUTE_LIMIT =  "jdk.xml.elementAttributeLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   117
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   118
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   119
     * JDK maxOccur limit; Note that the existing system property
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   120
     * "maxOccurLimit" with no prefix is still observed
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   121
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   122
    public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   123
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   124
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   125
     * JDK total entity size limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   126
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   127
    public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   128
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   129
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   130
     * JDK maximum general entity size limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   131
     */
22418
1ee8fd0184d1 8028111: XML readers share the same entity expansion counter
joehw
parents: 22139
diff changeset
   132
    public static final String SP_GENERAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit";
20968
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   133
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   134
     * JDK maximum parameter entity size limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   135
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   136
    public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   137
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   138
     * JDK maximum XML name limit
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   139
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   140
    public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   141
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   142
    //legacy System Properties
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   143
    public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   144
    public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ;
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   145
    public final static String MAX_OCCUR_LIMIT = "maxOccurLimit";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   146
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   147
    /**
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   148
     * A string "yes" that can be used for properties such as getEntityCountInfo
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   149
     */
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   150
    public static final String JDK_YES = "yes";
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   151
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
   152
    // Oracle Feature:
17534
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   153
    /**
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   154
     * <p>Use Service Mechanism</p>
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   155
     *
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   156
     * <ul>
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   157
     *   <li>
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   158
         * {@code true} instruct an object to use service mechanism to
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   159
         * find a service implementation. This is the default behavior.
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
   160
         *   </li>
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
   161
         *   <li>
17534
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   162
         * {@code false} instruct an object to skip service mechanism and
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   163
         * use the default implementation for that service.
20968
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   164
         *   </li>
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   165
         * </ul>
dde41f8b7b96 8014530: Better digital signature processing
joehw
parents: 18890
diff changeset
   166
         */
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
   167
    public static final String ORACLE_FEATURE_SERVICE_MECHANISM = "http://www.oracle.com/feature/use-service-mechanism";
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
   168
17534
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   169
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   170
    //System Properties corresponding to ACCESS_EXTERNAL_* properties
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   171
    public static final String SP_ACCESS_EXTERNAL_STYLESHEET = "javax.xml.accessExternalStylesheet";
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   172
    public static final String SP_ACCESS_EXTERNAL_DTD = "javax.xml.accessExternalDTD";
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   173
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   174
    //all access keyword
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   175
    public static final String ACCESS_EXTERNAL_ALL = "all";
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   176
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   177
    /**
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   178
     * Default value when FEATURE_SECURE_PROCESSING (FSP) is set to true
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   179
     */
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   180
    public static final String EXTERNAL_ACCESS_DEFAULT_FSP = "";
18890
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   181
17534
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   182
    /**
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   183
     * FEATURE_SECURE_PROCESSING (FSP) is false by default
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   184
     */
17991
4a8c5120a8d4 8015630: Remove default restriction settings of jaxp 1.5 properties in JDK8
joehw
parents: 17534
diff changeset
   185
    public static final String EXTERNAL_ACCESS_DEFAULT = ACCESS_EXTERNAL_ALL;
17534
21dc0b2762da 8011653: Upgrade JDK8 to JAXP 1.5
joehw
parents: 14864
diff changeset
   186
18890
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   187
    public static final String XML_SECURITY_PROPERTY_MANAGER =
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   188
            ORACLE_JAXP_PROPERTY_PREFIX + "xmlSecurityPropertyManager";
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   189
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   190
    /**
21467
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   191
     * Feature enableExtensionFunctions
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   192
     */
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   193
    public static final String ORACLE_ENABLE_EXTENSION_FUNCTION =
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   194
            ORACLE_JAXP_PROPERTY_PREFIX + "enableExtensionFunctions";
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   195
    public static final String SP_ORACLE_ENABLE_EXTENSION_FUNCTION = "javax.xml.enableExtensionFunctions";
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   196
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   197
    /**
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   198
     * Values for a feature
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   199
     */
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   200
    public static final String FEATURE_TRUE = "true";
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   201
    public static final String FEATURE_FALSE = "false";
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   202
ed77f0ff062c 8004476: XSLT Extension Functions Don't Work in WebStart
joehw
parents: 20968
diff changeset
   203
    /**
18890
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   204
     * Check if we're in jdk8 or above
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   205
     */
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   206
    public static final boolean IS_JDK8_OR_ABOVE = isJavaVersionAtLeast(8);
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   207
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   208
    /*
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   209
     * Check the version of the current JDK against that specified in the
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   210
     * parameter
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   211
     *
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   212
     * There is a proposal to change the java version string to:
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   213
     * MAJOR.MINOR.FU.CPU.PSU-BUILDNUMBER_BUGIDNUMBER_OPTIONAL
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   214
     * This method would work with both the current format and that proposed
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   215
     *
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   216
     * @param compareTo a JDK version to be compared to
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   217
     * @return true if the current version is the same or above that represented
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   218
     * by the parameter
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   219
     */
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   220
    public static boolean isJavaVersionAtLeast(int compareTo) {
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   221
        String javaVersion = SecuritySupport.getSystemProperty("java.version");
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   222
        String versions[] = javaVersion.split("\\.", 3);
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   223
        if (Integer.parseInt(versions[0]) >= compareTo ||
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   224
            Integer.parseInt(versions[1]) >= compareTo) {
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   225
            return true;
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   226
        }
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   227
        return false;
25bdeca3173b 8016648: FEATURE_SECURE_PROCESSING set to true or false causes SAXParseException to be thrown
joehw
parents: 17991
diff changeset
   228
    }
12458
d601e4bba306 7160380: Sync JDK8 with JAXP 1.4.5
joehw
parents:
diff changeset
   229
} // class Constants