001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements. See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership. The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the  "License");
007     * you may not use this file except in compliance with the License.
008     * You may obtain a copy of the License at
009     *
010     *     http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing, software
013     * distributed under the License is distributed on an "AS IS" BASIS,
014     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015     * See the License for the specific language governing permissions and
016     * limitations under the License.
017     */
018    /*
019     * $Id: DOMConstants.java 1225426 2011-12-29 04:13:08Z mrglavas $
020     */
021    
022    package org.apache.xml.serializer.dom3;
023    
024    /**
025     * DOM Constants used by the DOM Level 3 LSSerializer implementation.
026     *
027     * @xsl.usage internal
028     */
029    final class DOMConstants {
030        //
031        // Constants: DOM Level 3 feature ids
032        //
033        public static final String DOM3_REC_URL = "http://www.w3.org/TR/DOM-Level-3-LS";
034    
035        public static final String XERCES_URL = "http://xml.apache.org/xerces-2j";
036    
037        // The namespace used to qualified DOM Level 3 DOMConfiguration parameters
038        public static final String S_DOM3_PROPERTIES_NS = "{"
039                + DOMConstants.DOM3_REC_URL + "}";
040    
041        public static final String S_XERCES_PROPERTIES_NS = "{"
042                + DOMConstants.XERCES_URL + "}";
043    
044        // xmlns namespaces 
045        private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
046    
047        // namespace prefix
048        private static final String XMLNS_PREFIX = "xmlns";
049    
050        // ************************************************************************
051        // DOM Level 3 DOM Configuration parameter names
052        // ************************************************************************
053        // DOM Level 3 parameters defined in Core
054        public static final String DOM_CANONICAL_FORM = "canonical-form"; // Unsupported, we only appear to support this
055    
056        public static final String DOM_CDATA_SECTIONS = "cdata-sections";
057    
058        public static final String DOM_CHECK_CHAR_NORMALIZATION = "check-character-normalization"; // Unsupported
059    
060        public static final String DOM_COMMENTS = "comments";
061    
062        public static final String DOM_DATATYPE_NORMALIZATION = "datatype-normalization"; // Unsupported
063    
064        public static final String DOM_ELEMENT_CONTENT_WHITESPACE = "element-content-whitespace";
065    
066        public static final String DOM_ENTITIES = "entities";
067    
068        public static final String DOM_INFOSET = "infoset";
069    
070        public static final String DOM_NAMESPACES = "namespaces";
071    
072        public static final String DOM_NAMESPACE_DECLARATIONS = "namespace-declarations";
073    
074        public static final String DOM_NORMALIZE_CHARACTERS = "normalize-characters"; // Unsupported
075    
076        public static final String DOM_SPLIT_CDATA = "split-cdata-sections";
077    
078        public static final String DOM_VALIDATE_IF_SCHEMA = "validate-if-schema"; // Unsopported
079    
080        public static final String DOM_VALIDATE = "validate"; // Unsopported
081    
082        public static final String DOM_WELLFORMED = "well-formed";
083    
084        // DOM Level 3 Save
085        public static final String DOM_DISCARD_DEFAULT_CONTENT = "discard-default-content";
086    
087        public static final String DOM_FORMAT_PRETTY_PRINT = "format-pretty-print";
088    
089        public static final String DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS = "ignore-unknown-character-denormalizations"; // Unsupported
090    
091        public static final String DOM_XMLDECL = "xml-declaration";
092    
093        // DOM Properties
094        public static final String DOM_ERROR_HANDLER = "error-handler";
095    
096        public static final String DOM_SCHEMA_TYPE = "schema-type"; // Unsupported
097    
098        public static final String DOM_SCHEMA_LOCATION = "schema-location"; // Unsupported
099    
100        // ************************************************************************
101    
102        // XSL Output properties
103        // The xsl:output 'indent' property used in LSSerializer 
104        public static final String S_XSL_OUTPUT_INDENT = "indent";
105    
106        // The xsl:output 'indent' property used in LSSerializer 
107        public static final String S_XSL_OUTPUT_ENCODING = "encoding";
108    
109        // The xsl:output 'omit-xml-declaration' property used in LSSerializer 
110        public static final String S_XSL_OUTPUT_OMIT_XML_DECL = "omit-xml-declaration";
111    
112        // The xerces serializer specific 'omit-xml-declaration' property used in LSSerializer 
113        public static final String S_XML_VERSION = "xml-version";
114    
115        //     
116        public static final String S_XSL_VALUE_ENTITIES = "org/apache/xml/serializer/XMLEntities";
117        
118        // Parameter values
119        public static final String DOM3_EXPLICIT_TRUE = "explicit:yes";
120    
121        public static final String DOM3_DEFAULT_TRUE = "default:yes";
122    
123        public static final String DOM3_EXPLICIT_FALSE = "explicit:no";
124    
125        public static final String DOM3_DEFAULT_FALSE = "default:no";
126    
127        // DOM Exceptions
128        public static final String DOM_EXCEPTION_FEATURE_NOT_FOUND = "FEATURE_NOT_FOUND";
129    
130        public static final String DOM_EXCEPTION_FEATURE_NOT_SUPPORTED = "FEATURE_NOT_SUPPORTED";
131    
132        public static final String DOM_LSEXCEPTION_SERIALIZER_ERR = "SERIALIZER_ERROR";
133    
134    }