Author: jleroux
Date: Wed May 16 02:42:32 2012 New Revision: 1338975 URL: http://svn.apache.org/viewvc?rev=1338975&view=rev Log: Reverts r1338842, should have been deprecated and deprecation should not be backported Modified: ofbiz/branches/release11.04/ (props changed) ofbiz/branches/release11.04/framework/base/dtd/base-catalog.xml ofbiz/branches/release11.04/framework/base/dtd/ofbiz-properties.xsd ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java ofbiz/branches/release11.04/framework/common/config/CommonUiLabels.xml ofbiz/branches/release11.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java Propchange: ofbiz/branches/release11.04/ ------------------------------------------------------------------------------ Reverse-merged /ofbiz/trunk:r1338831 Modified: ofbiz/branches/release11.04/framework/base/dtd/base-catalog.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/base/dtd/base-catalog.xml?rev=1338975&r1=1338974&r2=1338975&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/base/dtd/base-catalog.xml (original) +++ ofbiz/branches/release11.04/framework/base/dtd/base-catalog.xml Wed May 16 02:42:32 2012 @@ -29,5 +29,4 @@ under the License. <system systemId="http://ofbiz.apache.org/dtds/jndi-config.xsd" uri="jndi-config.xsd"/> <system systemId="http://ofbiz.apache.org/dtds/ofbiz-component.xsd" uri="ofbiz-component.xsd"/> <system systemId="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd" uri="ofbiz-containers.xsd"/> - <system systemId="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd" uri="ofbiz-properties.xsd"/> </catalog> Modified: ofbiz/branches/release11.04/framework/base/dtd/ofbiz-properties.xsd URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/base/dtd/ofbiz-properties.xsd?rev=1338975&r1=1338974&r2=1338975&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/base/dtd/ofbiz-properties.xsd (original) +++ ofbiz/branches/release11.04/framework/base/dtd/ofbiz-properties.xsd Wed May 16 02:42:32 2012 @@ -36,12 +36,4 @@ under the License. <xs:attributeGroup name="attlist.property"> <xs:attribute type="xs:string" name="key" use="required"/> </xs:attributeGroup> - <xs:complexType name="valueType"> - <xs:simpleContent> - <xs:extension base="xs:string"> - <xs:attribute ref="xml:lang"/> - <xs:attribute ref="xml:space"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> </xs:schema> Modified: ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=1338975&r1=1338974&r2=1338975&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java (original) +++ ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java Wed May 16 02:42:32 2012 @@ -158,26 +158,20 @@ public class UtilXml { // ----- TrAX Methods ----------------- // - /** - * Creates a JAXP TrAX Transformer suitable for pretty-printing an XML document. This method is provided as an alternative to the deprecated - * <code>org.apache.xml.serialize.OutputFormat</code> class. - * - * @param encoding - * Optional encoding, defaults to UTF-8 - * @param omitXmlDeclaration - * If <code>true</code> the xml declaration will be omitted from the output - * @param indent - * If <code>true</code>, the output will be indented - * @param indentAmount - * If <code>indent</code> is <code>true</code>, the number of spaces to indent. Default is 4. - * @param keepSpace - * If <code>true</code> spaces are preserved, else striped + /** Creates a JAXP TrAX Transformer suitable for pretty-printing an + * XML document. This method is provided as an alternative to the + * deprecated <code>org.apache.xml.serialize.OutputFormat</code> class. + * @param encoding Optional encoding, defaults to UTF-8 + * @param omitXmlDeclaration If <code>true</code> the xml declaration + * will be omitted from the output + * @param indent If <code>true</code>, the output will be indented + * @param indentAmount If <code>indent</code> is <code>true</code>, + * the number of spaces to indent. Default is 4. * @return A <code>Transformer</code> instance * @see <a href="http://java.sun.com/javase/6/docs/api/javax/xml/transform/package-summary.html">JAXP TrAX</a> * @throws TransformerConfigurationException */ - public static Transformer createOutputTransformer(String encoding, boolean omitXmlDeclaration, boolean indent, int indentAmount, boolean keepSpace) - throws TransformerConfigurationException { + public static Transformer createOutputTransformer(String encoding, boolean omitXmlDeclaration, boolean indent, int indentAmount) throws TransformerConfigurationException { StringBuilder sb = new StringBuilder(); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); sb.append("<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xalan=\"http://xml.apache.org/xslt\" version=\"1.0\">\n"); @@ -195,11 +189,7 @@ public class UtilXml { sb.append(indentAmount <= 0 ? 4 : indentAmount); sb.append("\""); } - if (keepSpace) { - sb.append("/>\n<xsl:preserve-space elements=\"*\"/>\n"); - } else { - sb.append("/>\n<xsl:strip-space elements=\"*\"/>\n"); - } + sb.append("/>\n<xsl:strip-space elements=\"*\"/>\n"); sb.append("<xsl:template match=\"@*|node()\">\n"); sb.append("<xsl:copy><xsl:apply-templates select=\"@*|node()\"/></xsl:copy>\n"); sb.append("</xsl:template>\n</xsl:stylesheet>\n"); @@ -222,29 +212,21 @@ public class UtilXml { transformer.transform(source, result); } - /** - * Serializes a DOM <code>Node</code> to an <code>OutputStream</code> using JAXP TrAX. - * - * @param node - * The <code>Node</code> to serialize - * @param os - * The <code>OutputStream</code> to serialize to - * @param encoding - * Optional encoding, defaults to UTF-8 - * @param omitXmlDeclaration - * If <code>true</code> the xml declaration will be omitted from the output - * @param keepSpace - * If <code>true</code> spaces are preserved, else striped - * @param indent - * If <code>true</code>, the output will be indented - * @param indentAmount - * If <code>indent</code> is <code>true</code>, the number of spaces to indent. Default is 4. + /** Serializes a DOM <code>Node</code> to an <code>OutputStream</code> + * using JAXP TrAX. + * @param node The <code>Node</code> to serialize + * @param os The <code>OutputStream</code> to serialize to + * @param encoding Optional encoding, defaults to UTF-8 + * @param omitXmlDeclaration If <code>true</code> the xml declaration + * will be omitted from the output + * @param indent If <code>true</code>, the output will be indented + * @param indentAmount If <code>indent</code> is <code>true</code>, + * the number of spaces to indent. Default is 4. * @see <a href="http://java.sun.com/javase/6/docs/api/javax/xml/transform/package-summary.html">JAXP TrAX</a> * @throws TransformerException */ - public static void writeXmlDocument(Node node, OutputStream os, String encoding, boolean omitXmlDeclaration, boolean indent, int indentAmount, - boolean keepSpace) throws TransformerException { - Transformer transformer = createOutputTransformer(encoding, omitXmlDeclaration, indent, indentAmount, keepSpace); + public static void writeXmlDocument(Node node, OutputStream os, String encoding, boolean omitXmlDeclaration, boolean indent, int indentAmount) throws TransformerException { + Transformer transformer = createOutputTransformer(encoding, omitXmlDeclaration, indent, indentAmount); transformDomDocument(transformer, node, os); } @@ -343,9 +325,9 @@ public class UtilXml { return; } // OutputFormat defaults are: indent on, indent = 4, include XML declaration, - // charset = UTF-8, line width = 72, strip spaces + // charset = UTF-8, line width = 72 try { - writeXmlDocument(node, os, "UTF-8", false, true, 4, false); + writeXmlDocument(node, os, "UTF-8", false, true, 4); } catch (TransformerException e) { // Wrapping this exception for backwards compatibility throw new IOException(e.getMessage()); Modified: ofbiz/branches/release11.04/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/common/config/CommonUiLabels.xml?rev=1338975&r1=1338974&r2=1338975&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/branches/release11.04/framework/common/config/CommonUiLabels.xml Wed May 16 02:42:32 2012 @@ -18,12 +18,12 @@ specific language governing permissions and limitations under the License. --> -<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd"> +<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <property key="AP"> <value xml:lang="en">AP</value> <value xml:lang="es">CC.P.</value> <value xml:lang="fr">Cpt. fourn.</value> - <value xml:lang="hi-IN">लà¥à¤à¤¾ दà¥à¤¯</value> + <value xml:lang="hi_IN">लà¥à¤à¤¾ दà¥à¤¯</value> <value xml:lang="it">AP</value> <value xml:lang="nl">Schulden</value> <value xml:lang="pt_BR">Contas a pagar</value> @@ -114,16 +114,6 @@ <value xml:lang="zh_CN">ç®å½</value> <value xml:lang="zh_TW">ç®é</value> </property> - <property key="CatalogComponentDescription"> - <value xml:lang="en">Product Catalog management, Categories, Product, Price rules, Promotions, Product Store</value> - <value xml:lang="fr">Gestion des catalogues, Catégories, Articles, Promotions, Règles de prix, Centres de profit </value> - </property> - <property key="CommonAbort"> - <value xml:lang="en">Abort</value> - <value xml:lang="es">Cancelar</value> - <value xml:lang="fr">Abandonner</value> - <value xml:lang="vi">Hủy</value> - </property> <property key="CommonAccepted"> <value xml:lang="ar">Ù ÙبÙÙ</value> <value xml:lang="de">Angenommen</value> @@ -382,13 +372,6 @@ <value xml:lang="zh_CN">å°åæ </value> <value xml:lang="zh_TW">å°åç·</value> </property> - <property key="CommonAddressNotFound"> - <value xml:lang="de">Die Adresse wurde nicht gefunden.</value> - <value xml:lang="en">Address not found.</value> - <value xml:lang="es">Dirección no encontrada.</value> - <value xml:lang="fr">Adresse inconnue</value> - <value xml:lang="vi">Không tìm thấy Äá»a chá»</value> - </property> <property key="CommonAddresses"> <value xml:lang="ar">عÙاÙÙÙ</value> <value xml:lang="de">Adressen</value> @@ -2544,7 +2527,6 @@ <value xml:lang="zh_TW">é»åéµä»¶</value> </property> <property key="CommonEmptyHeader"> - <!-- do not remove this! --> <value xml:lang="en" xml:space="preserve"> </value> </property> <property key="CommonEnable"> @@ -10267,26 +10249,6 @@ <value xml:lang="zh">æææ¥æ</value> <value xml:lang="zh_TW">æææ¥</value> </property> - <property key="FormFieldTitle_expireButton"> - <value xml:lang="ar">ÙÙاÙØ© اÙصÙاØÙØ©</value> - <value xml:lang="cs">VyprÅ¡et</value> - <value xml:lang="de">Ablaufen</value> - <value xml:lang="en">Expire</value> - <value xml:lang="es">Expiración</value> - <value xml:lang="fr">Invalider</value> - <value xml:lang="hi-IN">निशà¥à¤µà¤¾à¤¸à¤¨</value> - <value xml:lang="it">Scade</value> - <value xml:lang="nl">Maak verlopen</value> - <value xml:lang="pt">Expirar</value> - <value xml:lang="pt-PT">Terminar</value> - <value xml:lang="ro">Expira</value> - <value xml:lang="ru">ÐÑекÑаÑиÑÑ</value> - <value xml:lang="th">หมà¸à¹à¸à¸</value> - <value xml:lang="vi">Hết hạn</value> - <value xml:lang="zh">è¿æ</value> - <value xml:lang="zh-CN">è¿æ</value> - <value xml:lang="zh-TW">éæ</value> - </property> <property key="FormFieldTitle_fromDate"> <value xml:lang="ar">تارÙØ® اÙبدء</value> <value xml:lang="de">Von Datum</value> Modified: ofbiz/branches/release11.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java?rev=1338975&r1=1338974&r2=1338975&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java (original) +++ ofbiz/branches/release11.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java Wed May 16 02:42:32 2012 @@ -34,8 +34,10 @@ import org.ofbiz.base.util.UtilPropertie import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; import org.ofbiz.base.util.cache.UtilCache; + import org.ofbiz.service.DispatchContext; import org.ofbiz.service.ServiceUtil; + import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -148,7 +150,7 @@ public class SaveLabelsToXmlFile { if (apacheLicenseText != null) { fos.write(apacheLicenseText.getBytes()); } - UtilXml.writeXmlDocument(resourceElem, fos, "UTF-8", !(apacheLicenseText == null), true, 4, true); + UtilXml.writeXmlDocument(resourceElem, fos, "UTF-8", !(apacheLicenseText == null), true, 4); } finally { fos.close(); // clear cache to see immediately the new labels and |
Free forum by Nabble | Edit this page |