m_outputFormat = new OutputProperties(method); else m_outputFormat = new OutputProperties(); m_outputFormat.copyFrom(oformat);
/** * Copy the keys and values from the source to this object. This will * not copy the default values. This is meant to be used by going from * a higher precedence object to a lower precedence object, so that if a * key already exists, this method will not reset it. * * @param opsrc non-null reference to an OutputProperties. */ public void copyFrom(OutputProperties opsrc) throws TransformerException { // Bugzilla 6157: recover from xsl:output statements // checkDuplicates(opsrc); copyFrom(opsrc.getProperties()); }
(OutputProperties) getStylesheet().getOutputComposed().clone(); if (!OutputProperties.isLegalPropertyKey(name)) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, new Object[]{name})); //"output property not recognized: " m_outputFormat.setProperty(name, value);
/** * Get an output property that is in effect for the * transformation. The property specified may be a property * that was set with setOutputProperty, or it may be a * property specified in the stylesheet. * * @param name A non-null String that specifies an output * property name, which may be namespace qualified. * * @return The string value of the output property, or null * if no property was found. * * @throws IllegalArgumentException If the property is not supported. * * @see javax.xml.transform.OutputKeys */ public String getOutputProperty(String name) throws IllegalArgumentException { String value = null; OutputProperties props = m_outputFormat; value = props.getProperty(name); if (null == value) { if (!OutputProperties.isLegalPropertyKey(name)) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, new Object[]{name})); //"output property not recognized: " // + name); } return value; }
m_outputProperties = new OutputProperties(org.apache.xml.serializer.Method.UNKNOWN); m_outputProperties.compose(this); m_outputProperties.endCompose(this);
m_outputProperties = new OutputProperties(); m_outputProperties.setDOMBackPointer(handler.getOriginatingNode()); m_outputProperties.setLocaterInfo(handler.getLocator()); m_outputProperties.setUid(handler.nextUid()); setPropertiesFromAttributes(handler, rawName, attributes, this); (String) m_outputProperties.getProperties().get(OutputPropertiesFactory.S_KEY_ENTITIES); m_outputProperties.getProperties().put(OutputPropertiesFactory.S_KEY_ENTITIES, absURL);
OutputProperties htmlOutputProperties = new OutputProperties(Method.HTML); htmlOutputProperties.copyFrom(prevProperties, true); Properties htmlProperties = htmlOutputProperties.getProperties();
private OutputProperties m_textformat = new OutputProperties(Method.TEXT); handler.setNextSibling(nextSibling); String encoding = format.getProperty(OutputKeys.ENCODING); xoh = new ToXMLSAXHandler(handler, (LexicalHandler)handler, encoding); lexHandler = null; String encoding = format.getProperty(OutputKeys.ENCODING); String method = format.getProperty(OutputKeys.METHOD); String publicID = format.getProperty(OutputKeys.DOCTYPE_PUBLIC); String systemID = format.getProperty(OutputKeys.DOCTYPE_SYSTEM); if (systemID != null) xoh.setDoctypeSystem(systemID); (SerializationHandler) SerializerFactory.getSerializer(format.getProperties());
/** * Searches for the boolean property with the specified key in the property list. * If the key is not found in this property list, the default property list, * and its defaults, recursively, are then checked. The method returns * <code>false</code> if the property is not found, or if the value is other * than "yes". * * @param key the property key. * @return the value in this property list as a boolean value, or false * if null or not "yes". */ public boolean getBooleanProperty(QName key) { return getBooleanProperty(key.toNamespacedString()); }
/** * Searches for the qname property with the specified key in the property list. * If the key is not found in this property list, the default property list, * and its defaults, recursively, are then checked. The method returns * <code>null</code> if the property is not found. * * @param key the property key. * @return the value in this property list as a QName value, or false * if null or not "yes". */ public QName getQNameProperty(String key) { return getQNameProperty(key, m_properties); }
/** * Searches for the int property with the specified key in the property list. * If the key is not found in this property list, the default property list, * and its defaults, recursively, are then checked. The method returns * <code>false</code> if the property is not found, or if the value is other * than "yes". * * @param key the property key. * @return the value in this property list as a int value, or false * if null or not a number. */ public int getIntProperty(QName key) { return getIntProperty(key.toNamespacedString()); }
/** * Searches for the list of qname properties with the specified key in * the property list. * If the key is not found in this property list, the default property list, * and its defaults, recursively, are then checked. The method returns * <code>null</code> if the property is not found. * * @param key the property key. * @return the value in this property list as a vector of QNames, or false * if null or not "yes". */ public Vector getQNameProperties(String key) { return getQNameProperties(key, m_properties); }
/** * Get the value of a property, without using the default properties. This * can be used to test if a property has been explicitly set by the stylesheet * or user. * * NEEDSDOC @param qnameString * * @return The value of the property, or null if not found. * * @throws IllegalArgumentException If the property is not supported, * and is not namespaced. */ public String getOutputPropertyNoDefault(String qnameString) throws IllegalArgumentException { String value = null; OutputProperties props = getOutputFormat(); value = (String) props.getProperties().get(qnameString); if (null == value) { if (!OutputProperties.isLegalPropertyKey(qnameString)) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, new Object[]{qnameString})); //"output property not recognized: " // + qnameString); } return value; }
m_outputProperties = new OutputProperties(org.apache.xml.serializer.Method.UNKNOWN); m_outputProperties.compose(this); m_outputProperties.endCompose(this);
/** * Copy the keys and values from the source to this object. This will * not copy the default values. This is meant to be used by going from * a higher precedence object to a lower precedence object, so that if a * key already exists, this method will not reset it. * * @param src non-null reference to the source properties. */ public void copyFrom(Properties src) { copyFrom(src, true); }
public Properties getDefaultOutputProps() { return m_outputProperties.getProperties(); }
/** * Constructor TransformerIdentityImpl creates an identity transform. * */ public TransformerIdentityImpl(boolean isSecureProcessing) { m_outputFormat = new OutputProperties(Method.XML); m_isSecureProcessing = isSecureProcessing; }
m_outputProperties = new OutputProperties(org.apache.xml.serializer.Method.UNKNOWN); m_outputProperties.compose(this); m_outputProperties.endCompose(this);
/** * Get an output property that is in effect for the * transformation. The property specified may be a property * that was set with setOutputProperty, or it may be a * property specified in the stylesheet. * * @param name A non-null String that specifies an output * property name, which may be namespace qualified. * * @return The string value of the output property, or null * if no property was found. * * @throws IllegalArgumentException If the property is not supported. * * @see javax.xml.transform.OutputKeys */ public String getOutputProperty(String name) throws IllegalArgumentException { String value = null; OutputProperties props = m_outputFormat; value = props.getProperty(name); if (null == value) { if (!OutputProperties.isLegalPropertyKey(name)) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, new Object[]{name})); //"output property not recognized: " // + name); } return value; }
Properties prevProperties = transformer.getOutputFormat().getProperties(); OutputProperties htmlOutputProperties = new OutputProperties(Method.HTML); htmlOutputProperties.copyFrom(prevProperties, true); Properties htmlProperties = htmlOutputProperties.getProperties();