1 /* 2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package com.sun.org.apache.xalan.internal; 27 28 import com.sun.org.apache.xalan.internal.utils.SecuritySupport; 29 30 /** 31 * Commonly used constants. 32 * 33 * @author Huizhe Wang, Oracle 34 * 35 * @version $Id: Constants.java,v 1.14 2011-06-07 04:39:40 joehw Exp $ 36 */ 37 public final class XalanConstants { 38 39 // 40 // Constants 41 // 42 // Oracle Feature: 43 /** 44 * <p>Use Service Mechanism</p> 45 * 46 * <ul> 47 * <li> 48 * {@code true} instruct an object to use service mechanism to 49 * find a service implementation. This is the default behavior. 50 * </li> 51 * <li> 52 * {@code false} instruct an object to skip service mechanism and 53 * use the default implementation for that service. 54 * </li> 55 * </ul> 56 */ 57 58 public static final String ORACLE_FEATURE_SERVICE_MECHANISM = "http://www.oracle.com/feature/use-service-mechanism"; 59 60 /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */ 61 public static final String ORACLE_JAXP_PROPERTY_PREFIX = 62 "http://www.oracle.com/xml/jaxp/properties/"; 63 64 //System Properties corresponding to ACCESS_EXTERNAL_* properties 65 public static final String SP_ACCESS_EXTERNAL_STYLESHEET = "javax.xml.accessExternalStylesheet"; 66 public static final String SP_ACCESS_EXTERNAL_DTD = "javax.xml.accessExternalDTD"; 67 68 69 //all access keyword 70 public static final String ACCESS_EXTERNAL_ALL = "all"; 71 72 /** 73 * Default value when FEATURE_SECURE_PROCESSING (FSP) is set to true 74 */ 75 public static final String EXTERNAL_ACCESS_DEFAULT_FSP = ""; 76 /** 77 * JDK version by which the default is to restrict external connection 78 */ 79 public static final int RESTRICT_BY_DEFAULT_JDK_VERSION = 8; 80 /** 81 * FEATURE_SECURE_PROCESSING (FSP) is false by default 82 */ 83 public static final String EXTERNAL_ACCESS_DEFAULT = ACCESS_EXTERNAL_ALL; 84 85 } // class Constants