Home | History | Annotate | Download | only in dom3
      1 /*
      2  * Licensed to the Apache Software Foundation (ASF) under one
      3  * or more contributor license agreements. See the NOTICE file
      4  * distributed with this work for additional information
      5  * regarding copyright ownership. The ASF licenses this file
      6  * to you under the Apache License, Version 2.0 (the  "License");
      7  * you may not use this file except in compliance with the License.
      8  * You may obtain a copy of the License at
      9  *
     10  *     http://www.apache.org/licenses/LICENSE-2.0
     11  *
     12  * Unless required by applicable law or agreed to in writing, software
     13  * distributed under the License is distributed on an "AS IS" BASIS,
     14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15  * See the License for the specific language governing permissions and
     16  * limitations under the License.
     17  */
     18 /*
     19  * $Id:  $
     20  */
     21 
     22 package org.apache.xml.serializer.dom3;
     23 
     24 /**
     25  * DOM Constants used by the DOM Level 3 LSSerializer implementation.
     26  *
     27  * @xsl.usage internal
     28  */
     29 final class DOMConstants {
     30     //
     31     // Constants: DOM Level 3 feature ids
     32     //
     33     public static final String DOM3_REC_URL = "http://www.w3.org/TR/DOM-Level-3-LS";
     34 
     35     public static final String XERCES_URL = "http://xml.apache.org/xerces-2j";
     36 
     37     // The namespace used to qualified DOM Level 3 DOMConfiguration parameters
     38     public static final String S_DOM3_PROPERTIES_NS = "{"
     39             + DOMConstants.DOM3_REC_URL + "}";
     40 
     41     public static final String S_XERCES_PROPERTIES_NS = "{"
     42             + DOMConstants.XERCES_URL + "}";
     43 
     44     // xmlns namespaces
     45     private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
     46 
     47     // namespace prefix
     48     private static final String XMLNS_PREFIX = "xmlns";
     49 
     50     // ************************************************************************
     51     // DOM Level 3 DOM Configuration parameter names
     52     // ************************************************************************
     53     // DOM Level 3 parameters defined in Core
     54     public static final String DOM_CANONICAL_FORM = "canonical-form"; // Unsupported, we only appear to support this
     55 
     56     public static final String DOM_CDATA_SECTIONS = "cdata-sections";
     57 
     58     public static final String DOM_CHECK_CHAR_NORMALIZATION = "check-character-normalization"; // Unsupported
     59 
     60     public static final String DOM_COMMENTS = "comments";
     61 
     62     public static final String DOM_DATATYPE_NORMALIZATION = "datatype-normalization"; // Unsupported
     63 
     64     public static final String DOM_ELEMENT_CONTENT_WHITESPACE = "element-content-whitespace";
     65 
     66     public static final String DOM_ENTITIES = "entities";
     67 
     68     public static final String DOM_INFOSET = "infoset";
     69 
     70     public static final String DOM_NAMESPACES = "namespaces";
     71 
     72     public static final String DOM_NAMESPACE_DECLARATIONS = "namespace-declarations";
     73 
     74     public static final String DOM_NORMALIZE_CHARACTERS = "normalize-characters"; // Unsupported
     75 
     76     public static final String DOM_SPLIT_CDATA = "split-cdata-sections";
     77 
     78     public static final String DOM_VALIDATE_IF_SCHEMA = "validate-if-schema"; // Unsopported
     79 
     80     public static final String DOM_VALIDATE = "validate"; // Unsopported
     81 
     82     public static final String DOM_WELLFORMED = "well-formed";
     83 
     84     // DOM Level 3 Save
     85     public static final String DOM_DISCARD_DEFAULT_CONTENT = "discard-default-content";
     86 
     87     public static final String DOM_FORMAT_PRETTY_PRINT = "format-pretty-print";
     88 
     89     public static final String DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS = "ignore-unknown-character-denormalizations"; // Unsupported
     90 
     91     public static final String DOM_XMLDECL = "xml-declaration";
     92 
     93     // DOM Properties
     94     public static final String DOM_ERROR_HANDLER = "error-handler";
     95 
     96     public static final String DOM_SCHEMA_TYPE = "schema-type"; // Unsupported
     97 
     98     public static final String DOM_SCHEMA_LOCATION = "schema-location"; // Unsupported
     99 
    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 }
    135