01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
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: package org.apache.batik.util;
20:
21: /**
22: * Contains common XML constants.
23: *
24: * @author <a href="mailto:vhardy@eng.sun.com">Vincent Hardy</a>
25: * @version $Id: XMLConstants.java 475477 2006-11-15 22:44:28Z cam $
26: */
27: public interface XMLConstants {
28:
29: // Namespace URIs
30: String XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
31: String XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";
32: String XLINK_NAMESPACE_URI = "http://www.w3.org/1999/xlink";
33: String XML_EVENTS_NAMESPACE_URI = "http://www.w3.org/2001/xml-events";
34:
35: // Namespace prefixes
36: String XML_PREFIX = "xml";
37: String XMLNS_PREFIX = "xmlns";
38: String XLINK_PREFIX = "xlink";
39:
40: // xml:{base,id,lang,space} and XML Events attributes
41: String XML_BASE_ATTRIBUTE = "base";
42: String XML_ID_ATTRIBUTE = "id";
43: String XML_LANG_ATTRIBUTE = "lang";
44: String XML_SPACE_ATTRIBUTE = "space";
45:
46: String XML_BASE_QNAME = XML_PREFIX + ':' + XML_BASE_ATTRIBUTE;
47: String XML_ID_QNAME = XML_PREFIX + ':' + XML_ID_ATTRIBUTE;
48: String XML_LANG_QNAME = XML_PREFIX + ':' + XML_LANG_ATTRIBUTE;
49: String XML_SPACE_QNAME = XML_PREFIX + ':' + XML_SPACE_ATTRIBUTE;
50:
51: String XML_DEFAULT_VALUE = "default";
52: String XML_PRESERVE_VALUE = "preserve";
53:
54: String XML_EVENTS_EVENT_ATTRIBUTE = "event";
55:
56: // XLink attributes
57: String XLINK_HREF_ATTRIBUTE = "href";
58: String XLINK_HREF_QNAME = XLINK_PREFIX + ':' + XLINK_HREF_ATTRIBUTE;
59:
60: // Serialization constants
61: String XML_TAB = " ";
62: String XML_OPEN_TAG_END_CHILDREN = " >";
63: String XML_OPEN_TAG_END_NO_CHILDREN = " />";
64: String XML_OPEN_TAG_START = "<";
65: String XML_CLOSE_TAG_START = "</";
66: String XML_CLOSE_TAG_END = ">";
67: String XML_SPACE = " ";
68: String XML_EQUAL_SIGN = "=";
69: String XML_EQUAL_QUOT = "=\"";
70: String XML_DOUBLE_QUOTE = "\"";
71: char XML_CHAR_QUOT = '\"';
72: char XML_CHAR_LT = '<';
73: char XML_CHAR_GT = '>';
74: char XML_CHAR_APOS = '\'';
75: char XML_CHAR_AMP = '&';
76: String XML_ENTITY_QUOT = """;
77: String XML_ENTITY_LT = "<";
78: String XML_ENTITY_GT = ">";
79: String XML_ENTITY_APOS = "'";
80: String XML_ENTITY_AMP = "&";
81: String XML_CHAR_REF_PREFIX = "&#x";
82: String XML_CHAR_REF_SUFFIX = ";";
83: String XML_CDATA_END = "]]>";
84: String XML_DOUBLE_DASH = "--";
85: String XML_PROCESSING_INSTRUCTION_END = "?>";
86:
87: // XML versions
88: String XML_VERSION_10 = "1.0";
89: String XML_VERSION_11 = "1.1";
90: }
|