/** * Creates an empty OutputProperties with the defaults specified by * a property file. The method argument is used to construct a string of * the form output_[method].properties (for instance, output_html.properties). * The output_xml.properties file is always used as the base. * <p>At the moment, anything other than 'text', 'xml', and 'html', will * use the output_xml.properties file.</p> * * @param method non-null reference to method name. * * @return Properties object that holds the defaults for the given method. * * @deprecated Use org.apache.xml.serializer.OuputPropertiesFactory. * getDefaultMethodProperties directly. */ static public Properties getDefaultMethodProperties(String method) { return org.apache.xml.serializer.OutputPropertiesFactory.getDefaultMethodProperties(method); } }
value = (String) props.get(key); String newKey = fixupPropertyString(key, true); String newValue = null; try newValue = fixupPropertyString(value, false); else newValue = fixupPropertyString(newValue, false);
m_xml_properties = loadPropertiesFile(fileName, null); loadPropertiesFile(fileName, m_xml_properties); loadPropertiesFile(fileName, m_xml_properties); if (null == m_text_properties.getProperty(OutputKeys.ENCODING)) loadPropertiesFile(fileName, m_xml_properties);
/** * Creates an empty OutputProperties with the defaults specified by * a property file. The method argument is used to construct a string of * the form output_[method].properties (for instance, output_html.properties). * The output_xml.properties file is always used as the base. * <p>At the moment, anything other than 'text', 'xml', and 'html', will * use the output_xml.properties file.</p> * * @param method non-null reference to method name. * * @return Properties object that holds the defaults for the given method. * * @deprecated Use org.apache.xml.serializer.OuputPropertiesFactory. * getDefaultMethodProperties directly. */ static public Properties getDefaultMethodProperties(String method) { return org.apache.xml.serializer.OutputPropertiesFactory.getDefaultMethodProperties(method); } }
m_xml_properties = loadPropertiesFile(fileName, null); loadPropertiesFile(fileName, m_xml_properties); loadPropertiesFile(fileName, m_xml_properties); if (null == m_text_properties.getProperty(OutputKeys.ENCODING)) loadPropertiesFile(fileName, m_xml_properties);
value = (String) props.get(key); String newKey = fixupPropertyString(key, true); String newValue = null; try newValue = fixupPropertyString(value, false); else newValue = fixupPropertyString(newValue, false);
/** * Creates an empty OutputProperties with the defaults specified by * a property file. The method argument is used to construct a string of * the form output_[method].properties (for instance, output_html.properties). * The output_xml.properties file is always used as the base. * <p>At the moment, anything other than 'text', 'xml', and 'html', will * use the output_xml.properties file.</p> * * @param method non-null reference to method name. */ public OutputProperties(String method) { m_properties = new Properties( OutputPropertiesFactory.getDefaultMethodProperties(method)); }
m_xml_properties = loadPropertiesFile(fileName, null); loadPropertiesFile(fileName, m_xml_properties); loadPropertiesFile(fileName, m_xml_properties); if (null == m_text_properties.getProperty(OutputKeys.ENCODING)) loadPropertiesFile(fileName, m_xml_properties);
value = (String) props.get(key); String newKey = fixupPropertyString(key, true); String newValue = null; try newValue = fixupPropertyString(value, false); else newValue = fixupPropertyString(newValue, false);
/** * Creates an empty OutputProperties with the defaults specified by * a property file. The method argument is used to construct a string of * the form output_[method].properties (for instance, output_html.properties). * The output_xml.properties file is always used as the base. * <p>At the moment, anything other than 'text', 'xml', and 'html', will * use the output_xml.properties file.</p> * * @param method non-null reference to method name. */ public OutputProperties(String method) { m_properties = new Properties( OutputPropertiesFactory.getDefaultMethodProperties(method)); }
m_xml_properties = loadPropertiesFile(fileName, null); loadPropertiesFile(fileName, m_xml_properties); loadPropertiesFile(fileName, m_xml_properties); if (null == m_text_properties.getProperty(OutputKeys.ENCODING)) loadPropertiesFile(fileName, m_xml_properties);
value = (String) props.get(key); String newKey = fixupPropertyString(key, true); String newValue = null; try newValue = fixupPropertyString(value, false); else newValue = fixupPropertyString(newValue, false);
/** * Internal method to get the default properties from the * serializer factory and set them on the property object. * @param props a java.util.Property object on which the properties are set. * @param method The output method type, one of "xml", "text", "html" ... */ private void setDefaults(Properties props, String method) { final Properties method_props = OutputPropertiesFactory.getDefaultMethodProperties(method); { final Enumeration names = method_props.propertyNames(); while (names.hasMoreElements()) { final String name = (String)names.nextElement(); props.setProperty(name, method_props.getProperty(name)); } } } /**
m_xml_properties = loadPropertiesFile(fileName, null); loadPropertiesFile(fileName, m_xml_properties); loadPropertiesFile(fileName, m_xml_properties); if (null == m_text_properties.getProperty(OutputKeys.ENCODING)) loadPropertiesFile(fileName, m_xml_properties);
value = (String) props.get(key); String newKey = fixupPropertyString(key, true); String newValue = null; try newValue = fixupPropertyString(value, false); else newValue = fixupPropertyString(newValue, false);
/** * Reset the default properties based on the method. * * @param method the method value. * @see javax.xml.transform.OutputKeys */ public void setMethodDefaults(String method) { String defaultMethod = m_properties.getProperty(OutputKeys.METHOD); if((null == defaultMethod) || !defaultMethod.equals(method) // bjm - add the next condition as a hack // but it is because both output_xml.properties and // output_unknown.properties have the same method=xml // for their default. Otherwise we end up with // a ToUnknownStream wraping a ToXMLStream even // when the users says method="xml" // || defaultMethod.equals("xml") ) { Properties savedProps = m_properties; Properties newDefaults = OutputPropertiesFactory.getDefaultMethodProperties(method); m_properties = new Properties(newDefaults); copyFrom(savedProps, false); } }
m_xml_properties = loadPropertiesFile(fileName, null); loadPropertiesFile(fileName, m_xml_properties); loadPropertiesFile(fileName, m_xml_properties); if (null == m_text_properties.getProperty(OutputKeys.ENCODING)) loadPropertiesFile(fileName, m_xml_properties);
value = (String) props.get(key); String newKey = fixupPropertyString(key, true); String newValue = null; try newValue = fixupPropertyString(value, false); else newValue = fixupPropertyString(newValue, false);
/** * Reset the default properties based on the method. * * @param method the method value. * @see javax.xml.transform.OutputKeys */ public void setMethodDefaults(String method) { String defaultMethod = m_properties.getProperty(OutputKeys.METHOD); if((null == defaultMethod) || !defaultMethod.equals(method) // bjm - add the next condition as a hack // but it is because both output_xml.properties and // output_unknown.properties have the same method=xml // for their default. Otherwise we end up with // a ToUnknownStream wraping a ToXMLStream even // when the users says method="xml" // || defaultMethod.equals("xml") ) { Properties savedProps = m_properties; Properties newDefaults = OutputPropertiesFactory.getDefaultMethodProperties(method); m_properties = new Properties(newDefaults); copyFrom(savedProps, false); } }
m_xml_properties = loadPropertiesFile(fileName, null); loadPropertiesFile(fileName, m_xml_properties); loadPropertiesFile(fileName, m_xml_properties); if (null == m_text_properties.getProperty(OutputKeys.ENCODING)) loadPropertiesFile(fileName, m_xml_properties);