1 package com.icl.saxon.output; 2 import javax.xml.transform.OutputKeys ; 3 4 12 13 public class SaxonOutputKeys { 14 15 20 21 public static final String INDENT_SPACES = "{http://icl.com/saxon}indent-spaces"; 22 23 28 29 public static final String OMIT_META_TAG = "{http://icl.com/saxon}omit-meta-tag"; 30 31 38 public static final String CHARACTER_REPRESENTATION = "{http://icl.com/saxon}character-representation"; 39 40 47 public static final String NEXT_IN_CHAIN = "{http://icl.com/saxon}next-in-chain"; 48 public static final String NEXT_IN_CHAIN_BASE_URI = "{http://icl.com/saxon}next-in-chain-base-uri"; 49 50 53 54 public static final boolean isValidOutputKey(String key) { 55 if (key.startsWith("{")) { 56 if (key.startsWith("{http://icl.com/saxon}")) { 57 return 58 key.equals(INDENT_SPACES) || 59 key.equals(OMIT_META_TAG) || 60 key.equals(CHARACTER_REPRESENTATION) || 61 key.equals(NEXT_IN_CHAIN) || 62 key.equals(NEXT_IN_CHAIN_BASE_URI) ; 63 } else { 64 return true; 65 } 66 } else { 67 return 68 key.equals(OutputKeys.CDATA_SECTION_ELEMENTS) || 69 key.equals(OutputKeys.DOCTYPE_PUBLIC) || 70 key.equals(OutputKeys.DOCTYPE_SYSTEM) || 71 key.equals(OutputKeys.ENCODING) || 72 key.equals(OutputKeys.INDENT) || 73 key.equals(OutputKeys.MEDIA_TYPE) || 74 key.equals(OutputKeys.METHOD) || 75 key.equals(OutputKeys.OMIT_XML_DECLARATION) || 76 key.equals(OutputKeys.STANDALONE) || 77 key.equals(OutputKeys.VERSION); 78 } 79 } 80 81 } 82 | Popular Tags |