001: /*
002: ******************************************************************
003: Copyright (c) 2001-2007 Jeff Martin, Tim Bacon
004: All rights reserved.
005:
006: Redistribution and use in source and binary forms, with or without
007: modification, are permitted provided that the following conditions
008: are met:
009:
010: * Redistributions of source code must retain the above copyright
011: notice, this list of conditions and the following disclaimer.
012: * Redistributions in binary form must reproduce the above
013: copyright notice, this list of conditions and the following
014: disclaimer in the documentation and/or other materials provided
015: with the distribution.
016: * Neither the name of the xmlunit.sourceforge.net nor the names
017: of its contributors may be used to endorse or promote products
018: derived from this software without specific prior written
019: permission.
020:
021: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
022: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
023: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
024: FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
025: COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
026: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
027: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
028: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
029: CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
030: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
031: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
032: POSSIBILITY OF SUCH DAMAGE.
033:
034: ******************************************************************
035: */
036:
037: package org.custommonkey.xmlunit;
038:
039: /**
040: * A convenient place to hang constants relating to general XML usage
041: */
042: public interface XMLConstants {
043:
044: /**
045: * <?xml> declaration
046: */
047: public static final String XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>";
048:
049: /**
050: * xmlns attribute prefix
051: */
052: public static final String XMLNS_PREFIX = "xmlns";
053:
054: /**
055: * "<"
056: */
057: public static final String OPEN_START_NODE = "<";
058:
059: /**
060: * "</"
061: */
062: public static final String OPEN_END_NODE = "</";
063:
064: /**
065: * ">"
066: */
067: public static final String CLOSE_NODE = ">";
068:
069: /**
070: * "![CDATA["
071: */
072: public static final String START_CDATA = "![CDATA[";
073: /**
074: * "]]"
075: */
076: public static final String END_CDATA = "]]";
077:
078: /**
079: * "!--"
080: */
081: public static final String START_COMMENT = "!--";
082: /**
083: * "--""
084: */
085: public static final String END_COMMENT = "--";
086:
087: /**
088: * "?"
089: */
090: public static final String START_PROCESSING_INSTRUCTION = "?";
091: /**
092: * "?"
093: */
094: public static final String END_PROCESSING_INSTRUCTION = "?";
095:
096: /**
097: * "!DOCTYPE"
098: */
099: public static final String START_DOCTYPE = "!DOCTYPE ";
100:
101: /**
102: * "/"
103: */
104: public static final String XPATH_SEPARATOR = "/";
105:
106: /**
107: * "["
108: */
109: public static final String XPATH_NODE_INDEX_START = "[";
110:
111: /**
112: * "]"
113: */
114: public static final String XPATH_NODE_INDEX_END = "]";
115:
116: /**
117: * "comment()"
118: */
119: public static final String XPATH_COMMENT_IDENTIFIER = "comment()";
120:
121: /**
122: * "processing-instruction()"
123: */
124: public static final String XPATH_PROCESSING_INSTRUCTION_IDENTIFIER = "processing-instruction()";
125:
126: /**
127: * "text()"
128: */
129: public static final String XPATH_CHARACTER_NODE_IDENTIFIER = "text()";
130:
131: /**
132: * "&at;"
133: */
134: public static final String XPATH_ATTRIBUTE_IDENTIFIER = "@";
135:
136: /**
137: * http://www.w3.org/2001/XMLSchema
138: */
139: public static final String W3C_XML_SCHEMA_NS_URI = "http://www.w3.org/2001/XMLSchema";
140:
141: /**
142: * http://www.w3.org/2001/XMLSchema-instance
143: */
144: public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI = "http://www.w3.org/2001/XMLSchema-instance";
145:
146: /**
147: * "schemaLocation"
148: */
149: public static final String W3C_XML_SCHEMA_INSTANCE_SCHEMA_LOCATION_ATTR = "schemaLocation";
150:
151: /**
152: * "noNamespaceSchemaLocation"
153: */
154: String W3C_XML_SCHEMA_INSTANCE_NO_NAMESPACE_SCHEMA_LOCATION_ATTR = "noNamespaceSchemaLocation";
155: }
|