From bbc5db1ac660640e72a7effbf70bace623c8d6c4 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 1 Oct 2008 09:04:58 +0000 Subject: CWS-TOOLING: integrate CWS sb93 --- .../org/openoffice/configuration/Decoder.java | 382 --------------------- .../org/openoffice/configuration/FileHelper.java | 74 ---- .../org/openoffice/configuration/Generator.java | 97 ------ .../org/openoffice/configuration/Inspector.java | 179 ---------- officecfg/org/openoffice/configuration/Trim.java | 49 --- .../configuration/XMLDefaultGenerator.java | 234 ------------- officecfg/org/openoffice/configuration/makefile.mk | 68 ---- .../openoffice/helper/DefaultNamespaceRemover.java | 96 ------ officecfg/org/openoffice/helper/PrettyPrinter.java | 297 ---------------- officecfg/org/openoffice/helper/Validator.java | 163 --------- officecfg/org/openoffice/helper/makefile.mk | 65 ---- officecfg/prj/d.lst | 1 - 12 files changed, 1705 deletions(-) (limited to 'officecfg') diff --git a/officecfg/org/openoffice/configuration/Decoder.java b/officecfg/org/openoffice/configuration/Decoder.java index c17381a20d3e..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/configuration/Decoder.java +++ b/officecfg/org/openoffice/configuration/Decoder.java @@ -1,382 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: Decoder.java,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package org.openoffice.configuration; - - -/** - * Title: Decoder - * Description: decoding of set element names given encoded (base64) - */ -public class Decoder extends Object -{ - //=========================================================== - // encoding table - //=========================================================== - static final int[] aEncodingTable = - { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', - 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', - 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '.' }; - - static class ModifiedUTF7Buffer extends Object - { - StringBuffer aBuffer; - int nValue; - int nFilled = 0; - - public ModifiedUTF7Buffer(StringBuffer _aBuffer) - { - aBuffer = _aBuffer; - } - - public void write(char c) - { - switch (nFilled) - { - case 0: - nValue = ((int)c) << 8; - nFilled = 2; - break; - case 1: - nValue |= ((int)c); - nFilled = 3; - flush(); - break; - case 2: - nValue |= ((int)c) >> 8; - nFilled = 3; - flush(); - nValue = (((int)c) & 0xFF) << 16; - nFilled = 1; - break; - } - } - - void flush() - { - switch (nFilled) - { - case 1: - aBuffer.append((char)aEncodingTable[nValue >> 18]); - aBuffer.append((char)aEncodingTable[nValue >> 12 & 63]); - break; - - case 2: - aBuffer.append((char)aEncodingTable[nValue >> 18]); - aBuffer.append((char)aEncodingTable[nValue >> 12 & 63]); - aBuffer.append((char)aEncodingTable[nValue >> 6 & 63]); - break; - - case 3: - aBuffer.append((char)aEncodingTable[nValue >> 18]); - aBuffer.append((char)aEncodingTable[nValue >> 12 & 63]); - aBuffer.append((char)aEncodingTable[nValue >> 6 & 63]); - aBuffer.append((char)aEncodingTable[nValue & 63]); - break; - } - nFilled = 0; - nValue = 0; - } - }; - - - //=========================================================== - // decoding table - //=========================================================== - static final int[] aModifiedBase64 - = { 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, // !"#$%&' - 65, 65, 65, 65, 65, 62, 63, 65, // ()*+,-./ - 52, 53, 54, 55, 56, 57, 58, 59, // 01234567 - 60, 61, 65, 65, 65, 65, 65, 65, // 89:;<=>? - 65, 0, 1, 2, 3, 4, 5, 6, // @ABCDEFG - 7, 8, 9, 10, 11, 12, 13, 14, // HIJKLMNO - 15, 16, 17, 18, 19, 20, 21, 22, // PQRSTUVW - 23, 24, 25, 65, 65, 65, 65, 64, // XYZ[\]^_ - 65, 26, 27, 28, 29, 30, 31, 32, // `abcdefg - 33, 34, 35, 36, 37, 38, 39, 40, // hijklmno - 41, 42, 43, 44, 45, 46, 47, 48, // pqrstuvw - 49, 50, 51, 65, 65, 65, 65, 65 // xyz{|}~ - }; - - static boolean isUsAsciiAlphaDigit(char c) - { - return isUsAsciiAlphaDigit(c,true); - } - - static boolean isUsAsciiAlphaDigit(char c, boolean bDigitAllowed) - { - return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' - || bDigitAllowed && c >= '0' && c <= '9'; - } - - static boolean write(int nUTF16Char, StringBuffer pBuffer, boolean bInitial) - { - if (isUsAsciiAlphaDigit((char)nUTF16Char, !bInitial) - || !bInitial&& (nUTF16Char == (int)'-' || nUTF16Char == (int)'.')) - return false; - pBuffer.append((char)nUTF16Char); - return true; - } - - //=========================================================== - // return the next position after the decoded part - // or -1 if an invalid character was found - //=========================================================== - static int decodeModifiedUTF7(String sSource, int nStartPos, - boolean bInitial, StringBuffer aBuffer) - { - final int nEnd = sSource.length(); - - int nUTF16Char = 0; - int nFilled = 0; - for (int nPos = nStartPos; nPos < nEnd; ++nPos) - { - - char c = sSource.charAt(nPos); - - int nc = (int)c; - int nDigit = nc < 128 ? aModifiedBase64[nc] : 65; - - switch (nDigit) - { - default: // valid character - switch (nFilled) - { - case 2: - nUTF16Char |= nDigit >> 2; - if (!write(nUTF16Char, aBuffer, bInitial)) - return -1; - break; - - case 5: - nUTF16Char |= nDigit >> 4; - if (!write(nUTF16Char, aBuffer, bInitial)) - return -1; - break; - - case 7: - nUTF16Char |= nDigit; - if (!write(nUTF16Char, aBuffer, bInitial)) - return -1; - break; - } - bInitial = false; - switch (nFilled) - { - - case 0: - nUTF16Char = nDigit << 10; - ++nFilled; - break; - - case 1: - nUTF16Char |= nDigit << 4; - ++nFilled; - break; - - case 2: - nUTF16Char = (nDigit & 3) << 14; - ++nFilled; - break; - - case 3: - nUTF16Char |= nDigit << 8; - ++nFilled; - break; - - case 4: - nUTF16Char |= nDigit << 2; - ++nFilled; - break; - - case 5: - nUTF16Char = (nDigit & 15) << 12; - ++nFilled; - break; - - case 6: - nUTF16Char |= nDigit << 6; - ++nFilled; - break; - - case 7: - nFilled = 0; - break; - } - break; - - case 64: // terminating '_' - switch (nFilled) - { - case 3: - case 6: - if (nUTF16Char != 0) - break; - case 0: - // success - return ++nPos; - } - case 65: // invalid character - return -1; - } - } - return -1; - } - - // return null, if the string was invalid - public static String decodeValid(String sSource) - { - StringBuffer aTarget = new StringBuffer(); - - final int nEnd = sSource.length(); - - int nPos = 0; - int nCopyEnd = 0; - - while(nPos < nEnd) - { - char c = sSource.charAt(nPos); - if (!isUsAsciiAlphaDigit(c, nPos != 0)) - switch (c) - { - case '_': - aTarget.append(sSource.substring(nCopyEnd, nPos )); - ++nPos; - - nPos = decodeModifiedUTF7(sSource, nPos, nPos == 1, aTarget); - if (nPos < 0) - return null; - - nCopyEnd = nPos; - continue; - - case '-': - case '.': - if (nPos != 0) - break; - default: - return null; - } - ++nPos; - } - - // System.out.println("Encoded string:" + sSource); - if (nCopyEnd == 0) - return sSource; - else - { - aTarget.append(sSource.substring(nCopyEnd)); - // System.out.println("Decoded string:" + aTarget.toString()); - return aTarget.toString(); - } - } - - // return the original value, if the string was invalid - public static String decode(String sSource) - { - String sResult = decodeValid(sSource); - System.out.println("Encoded string:" + sSource); - if (sResult == null) - System.out.println("Decoded string:" + "null"); - else - System.out.println("Decoded string:" + sResult); - return sResult != null ? sResult : sSource; - } - - public static String encode(String sSource) - { - StringBuffer aTarget = new StringBuffer(); - final int nEnd = sSource.length(); - int nCopyEnd = 0; - int nPos = 0; - while(nPos < nEnd) - { - char c = sSource.charAt(nPos); - if (!isUsAsciiAlphaDigit(c, nPos != 0)) - switch (c) - { - case '-': - case '.': - if (nPos != 0) - break; - default: - aTarget.append(sSource.substring(nCopyEnd, nPos )); - aTarget.append('_'); - - ModifiedUTF7Buffer aBuffer = new ModifiedUTF7Buffer(aTarget); - for (;;) - { - aBuffer.write(c); - nPos++; - if (nPos == nEnd) - break; - c = sSource.charAt(nPos); - if (isUsAsciiAlphaDigit(c) || c == '-' || c == '.') - break; - } - aBuffer.flush(); - aTarget.append('_'); - nCopyEnd = nPos; - continue; - } - nPos++; - } - - if (nCopyEnd == 0) - return sSource; - else - { - aTarget.append(sSource.substring(nCopyEnd)); - return aTarget.toString(); - } - } - - - public static void main(String args[]) - { - if (args.length != 1) - System.out.println("Usage : Convert filname"); - - String str = Decoder.decode(args[0]); - if(str == null) { - System.out.println("Our String is null"); - } else { - System.out.println("Our String " + str); - } - } - -} - - diff --git a/officecfg/org/openoffice/configuration/FileHelper.java b/officecfg/org/openoffice/configuration/FileHelper.java index d2a0ae0d4a53..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/configuration/FileHelper.java +++ b/officecfg/org/openoffice/configuration/FileHelper.java @@ -1,74 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: FileHelper.java,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package org.openoffice.configuration; -import java.io.*; - - -/** - * Title: File - * Description: decoding of set element names given encoded (base64) - */ -public class FileHelper extends Object -{ - // returns true if a file exists, otherwise false - public static boolean exists(String sSource) - { - File aFile = new File(sSource); - - try { - System.out.println("Path: " + aFile.getAbsoluteFile().toURL().toString()); - } catch (Exception e) - { - e.printStackTrace(); - } - return aFile.exists(); - } - - public static String makeAbs(String sSource) - { - String absPath = new String(); - File aFile = new File(sSource); - - try { - absPath = aFile.toURL().toString(); - // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6351751 - if (absPath.substring(0, 5) == "file:" && absPath.substring(5, 7) != "//") - absPath = "file://" + absPath.substring(5, absPath.length()); - if (absPath.charAt(absPath.length()-1) == '/') - absPath = absPath.substring(0, absPath.length()-1); - } catch (Exception e) - { - e.printStackTrace(); - } - return absPath; - } -} - - diff --git a/officecfg/org/openoffice/configuration/Generator.java b/officecfg/org/openoffice/configuration/Generator.java index 3a15cde1b733..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/configuration/Generator.java +++ b/officecfg/org/openoffice/configuration/Generator.java @@ -1,97 +0,0 @@ - -/** - * Title: Import of configuration schemas

- * Description:

- * Copyright: Copyright (c)

- * Company:

- * @author - * @version 1.0 - */ -package org.openoffice.configuration; - -import java.util.*; -import java.io.*; -import com.jclark.xsl.sax.Driver; - -public class Generator { - - public Generator() throws Exception - { - // set the driver for xt - System.setProperty("com.jclark.xsl.sax.parser", "org.apache.xerces.parsers.SAXParser"); - } - - /** - * creating a abs path of a source path - */ - static public String getAbsolutePath(String orgPath) throws IOException - { - String absolutePath = new String(); - if (orgPath.length() > 0) - { - StringTokenizer tokenizer = new StringTokenizer(orgPath, File.pathSeparator); - absolutePath = new File(tokenizer.nextToken()).getAbsoluteFile().toURL().toString(); - while (tokenizer.hasMoreTokens()) - { - absolutePath += File.pathSeparator; - absolutePath += tokenizer.nextToken(); - } - } - return absolutePath; - } - - public void generate(String argv []) throws Exception - { - try - { - // make sure that all directories exist - argv[2] = new File(argv[2]).getAbsoluteFile().toString(); - File path = new File(argv[2]).getParentFile().getAbsoluteFile(); - path.mkdirs(); - - Driver.main(argv); - - String[] args = new String[1]; - args[0] = argv[2]; - Trim.main(args); - } - catch (Exception e) - { - e.printStackTrace(); - throw e; - } - } - - public static void main (String argv []) - { - if (argv.length < 4) { - System.err.println ("Usage: cmd [transformation parameters]"); - System.err.println (": Configuration description file"); - System.err.println (": transformation file"); - System.err.println (": output file"); - System.err.println (": Path where to find imported configuration files"); - System.exit (1); - } - - try - { - Generator generator = new Generator(); - - String[] args = new String[argv.length + 1]; - for (int i = 0; i < argv.length; i++) - args[i] = argv[i]; - - // handle the path parameter for the source - args[3] = "path=" + getAbsolutePath(argv[3]); - args[argv.length] = "pathSeparator=" + File.pathSeparator; - - // create the instance file - generator.generate((String[])args.clone()); - } - catch (Exception pce) { - // Parser with specified options can't be built - pce.printStackTrace(); - System.exit (1); - } - } -} diff --git a/officecfg/org/openoffice/configuration/Inspector.java b/officecfg/org/openoffice/configuration/Inspector.java index e15de4c90f28..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/configuration/Inspector.java +++ b/officecfg/org/openoffice/configuration/Inspector.java @@ -1,179 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: Inspector.java,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package org.openoffice.configuration; - -import java.io.*; -import org.xml.sax.*; -import javax.xml.parsers.SAXParserFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; - -/** - * Title: Inspector - * Description: Validates an xml document against a dtd and retrieves the necessary - package and component informations

- */ -public class Inspector extends HandlerBase -{ - public java.lang.String componentName; - public java.lang.String packageName; - public java.lang.String categoryName; - public java.lang.String transformationFile; - - public Inspector() - { - componentName = new String(); - packageName = new String(); - transformationFile = new String("instance.xsl"); - } - - //=========================================================== - // SAX DocumentHandler methods - //=========================================================== - public InputSource resolveEntity(java.lang.String publicId, - java.lang.String systemId) - throws SAXException - { - // take the transformation file 'instance2.xsl' if schema.description2.dtd is used - if (new File(systemId).getName().equalsIgnoreCase("schema.description2.dtd")) - transformationFile = "instance2.xsl"; - - return new InputSource(systemId); - } - - - //=========================================================== - // SAX DocumentHandler methods - //=========================================================== - - public void setDocumentLocator (Locator l) - { - // Save this to resolve relative URIs or to give diagnostics. - System.out.println ("** Start validating: " + l.getSystemId()); - } - - public void startElement(java.lang.String name, - AttributeList attributes) throws SAXException - { - if (componentName.length() == 0 && name == "schema:component") - { - componentName = attributes.getValue("cfg:name"); - packageName = attributes.getValue("cfg:package"); - categoryName = attributes.getValue("schema:category"); - - if (categoryName == null) - categoryName = new String("PrivateApplProfile"); - } - } - - public void startDocument () - throws SAXException - { - } - - public void endDocument () - throws SAXException - { - System.out.println ("** Document is valid!"); - } - - //=========================================================== - // SAX ErrorHandler methods - //=========================================================== - - // treat validation errors as fatal - public void error (SAXParseException e) - throws SAXParseException - { - throw e; - } - - // dump warnings too - public void warning (SAXParseException err) - throws SAXParseException - { - System.out.println ("** Warning" - + ", line " + err.getLineNumber () - + ", uri " + err.getSystemId ()); - System.out.println(" " + err.getMessage ()); - } - - //=========================================================== - // Helpers ... - //=========================================================== - - public static void main (String argv []) - { - if (argv.length != 1) { - System.err.println ("Usage: cmd filename"); - System.exit (1); - } - // Use the validating parser - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(true); - try - { - // Parse the input - SAXParser saxParser = factory.newSAXParser(); - saxParser.parse( new File(argv [0]), new Inspector() ); - } - catch (SAXParseException spe) { - // Error generated by the parser - System.out.println ("\n** Parsing error" - + ", line " + spe.getLineNumber () - + ", uri " + spe.getSystemId ()); - System.out.println(" " + spe.getMessage() ); - System.exit (1); - } - catch (SAXException sxe) { - // Error generated by this application - // (or a parser-initialization error) - Exception x = sxe; - if (sxe.getException() != null) - x = sxe.getException(); - x.printStackTrace(); - System.exit (1); - } - catch (ParserConfigurationException pce) { - // Parser with specified options can't be built - pce.printStackTrace(); - System.exit (1); - - } - catch (IOException ioe) { - // I/O error - ioe.printStackTrace(); - System.exit (1); - } - - System.exit (0); - } - -} diff --git a/officecfg/org/openoffice/configuration/Trim.java b/officecfg/org/openoffice/configuration/Trim.java index 6eedd52f2d08..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/configuration/Trim.java +++ b/officecfg/org/openoffice/configuration/Trim.java @@ -1,49 +0,0 @@ - -/** - * Title: Import of configuration schemas

- * Description:

- * Copyright: Copyright (c)

- * Company:

- * @author - * @version 1.0 - */ -package org.openoffice.configuration; - -import java.util.*; -import java.io.*; - -class Trim -{ - public static void main (String argv []) - { - try - { - BufferedReader reader = new BufferedReader(new FileReader(argv[0])); - FileWriter out = new FileWriter(argv[0] + ".trim" ,false); - String line = ""; - boolean hadLine = false; - while ((line = reader.readLine()) != null) - { - if (line.trim().length() > 0) - { - hadLine = true; - out.write(line); - out.write("\n"); - } - else if (hadLine) - { - out.write("\n"); - hadLine = false; - } - } - out.flush(); - out.close(); - reader.close(); - - new File(argv[0]).delete(); - new File(argv[0] + ".trim").renameTo(new File(argv[0])); - } - catch (Exception e) - {} - } -} \ No newline at end of file diff --git a/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java b/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java index d419f2120701..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java +++ b/officecfg/org/openoffice/configuration/XMLDefaultGenerator.java @@ -1,234 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: XMLDefaultGenerator.java,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package org.openoffice.configuration; - -import org.xml.sax.*; -import org.w3c.dom.*; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import javax.xml.parsers.SAXParserFactory; -import javax.xml.parsers.SAXParser; -import java.util.*; -import java.io.*; -import com.jclark.xsl.sax.Driver; - -/** - * Title: XMLDefaultGenerator

- * Description: Tool for generating configuration default data

- */ -public class XMLDefaultGenerator { - - public static final String FILE_EXT = ".xml"; - - protected String packageName = null; - protected String componentName = null; - protected String categoryName = null; - protected String transformationFile = null; - - /** - * construct the generator by validation of the source file - */ - public XMLDefaultGenerator(String sourceFile) throws Exception - { - // set the driver for xt - System.setProperty("com.jclark.xsl.sax.parser", "org.apache.xerces.parsers.SAXParser"); - evaluateSchema(sourceFile); - } - - public String getComponentName() {return componentName;} - public String getPackageName() {return packageName;} - public String getCategoryName() {return categoryName;} - - /** - * construct the generator by validation of the source file - */ - protected void evaluateSchema(String schemaFile) throws Exception - { - try - { - SAXParserFactory factory = SAXParserFactory.newInstance(); - // factory.setValidating(true); - - // Parse the input - SAXParser saxParser = factory.newSAXParser(); - Inspector inspector = new Inspector(); - saxParser.parse( new File(new File(schemaFile).getAbsolutePath()).toURL().toString(), inspector ); - - // get the necessary information for generation - packageName = inspector.packageName; - componentName = inspector.componentName; - categoryName = inspector.categoryName; - transformationFile = inspector.transformationFile; - } - catch (SAXParseException spe) { - // Error generated by the parser - System.out.println ("\n** Parsing error" - + ", line " + spe.getLineNumber () - + ", uri " + spe.getSystemId ()); - System.out.println(" " + spe.getMessage() ); - throw spe; - } - catch (SAXException sxe) { - // Error generated by this application - // (or a parser-initialization error) - Exception x = sxe; - if (sxe.getException() != null) - x = sxe.getException(); - x.printStackTrace(); - throw sxe; - } - catch (IOException ioe) { - // I/O error - ioe.printStackTrace(); - throw ioe; - } - catch (Exception pce) { - // Parser with specified options can't be built - pce.printStackTrace(); - throw pce; - } - } - - /** - * creating the destination file name - */ - public String getTargetName(String aRoot, String aKind) throws Exception - { - String aRelPath = packageName.replace('.', File.separatorChar); - - // create the instance directory - File aFile = new File(aRoot + File.separatorChar + aKind + File.separatorChar + - aRelPath + File.separatorChar + componentName + FILE_EXT); - - return aFile.getPath(); - } - - /** - * generating the target document - */ - public void generate(String argv [], boolean asTemplate) throws Exception - { - // add the necessary transformation parameters - { - String[] args = new String[argv.length + 1]; - for (int i = 0; i < argv.length; i++) - args[i] = argv[i]; - - args[1] = argv[1] + File.separator + transformationFile; - - // handle the path parameter for the source - args[3] = "path=" + Generator.getAbsolutePath(argv[3]); - args[argv.length] = "pathSeparator=" + File.pathSeparator; - argv = args; - } - - try - { - // make sure that all directories exist - File path = new File(argv[2]).getParentFile(); - path.mkdirs(); - - String[] args = null; - // templates need a new argument, which is used for - // as parameter for the xsl translation - if (asTemplate) - { - args = new String[argv.length + 1]; - for (int i = 0; i < argv.length; i++) - args[i] = argv[i]; - - args[argv.length] = "templates=true"; - } - else - args = argv; - - Driver.main(args); - } - catch (Exception e) - { - e.printStackTrace(); - throw e; - } - } - - /** - * generating the instance document - */ - protected void generateInstanceFile(String argv []) throws Exception - { - argv[2] = getTargetName(argv[2], "instance"); - generate(argv, false); - } - - /** - * generating the template document - */ - protected void generateTemplateFile(String argv []) throws Exception - { - argv[2] = getTargetName(argv[2], "template"); - generate(argv, true); - } - - public static void main (String argv []) - { - if (argv.length < 4) { - System.err.println ("Usage: cmd [transformation parameters]"); - System.err.println (": Configuration description file"); - System.err.println (": Directory where to locate the transformation files used"); - System.err.println (": Directory where to generate the output files"); - System.err.println (": Path where to find imported configuration files"); - System.exit (1); - } - - try - { - XMLDefaultGenerator generator = new XMLDefaultGenerator(argv [0]); - - String[] args = new String[argv.length + 1]; - for (int i = 0; i < argv.length; i++) - args[i] = argv[i]; - - String url = new File(argv[2] + File.separator + "template") - .getAbsoluteFile().toURL().toString(); - args[argv.length] = "templateURL=" + url; - - // create the instance file - generator.generateInstanceFile((String[])args.clone()); - - // create the template file - generator.generateTemplateFile((String[])args.clone()); - } - catch (Exception pce) { - // Parser with specified options can't be built - pce.printStackTrace(); - System.exit (1); - } - } -} diff --git a/officecfg/org/openoffice/configuration/makefile.mk b/officecfg/org/openoffice/configuration/makefile.mk index 05e2dc4085fb..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/configuration/makefile.mk +++ b/officecfg/org/openoffice/configuration/makefile.mk @@ -1,68 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=officecfg -TARGET =cfgimport -PACKAGE=org$/openoffice$/configuration - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -JARFILES = xml-apis.jar xercesImpl.jar - -JAVACLASSFILES= \ - $(CLASSDIR)$/$(PACKAGE)$/XMLDefaultGenerator.class \ - $(CLASSDIR)$/$(PACKAGE)$/Generator.class \ - $(CLASSDIR)$/$(PACKAGE)$/Trim.class \ - $(CLASSDIR)$/$(PACKAGE)$/Decoder.class \ - $(CLASSDIR)$/$(PACKAGE)$/Inspector.class - -JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) - -RC_SUBDIRSDEPS=$(JAVATARGET) - -JARCLASSDIRS = $(PACKAGE) -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE - - -# --- Targets ------------------------------------------------------ - - -.INCLUDE : target.mk - -.IF "$(JARTARGETN)"!="" -$(JARTARGETN) : $(JAVACLASSFILES) $(JAVATARGET) -.ENDIF # "$(JARTARGETN)"!="" - diff --git a/officecfg/org/openoffice/helper/DefaultNamespaceRemover.java b/officecfg/org/openoffice/helper/DefaultNamespaceRemover.java index 47747b701084..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/helper/DefaultNamespaceRemover.java +++ b/officecfg/org/openoffice/helper/DefaultNamespaceRemover.java @@ -1,96 +0,0 @@ -/** - * Title: workaround for xslt bug with default namespaces - * Description: removes the first default namespace from a given xml file

- * Copyright: null

- * Company: null

- * @author Svante Schubert - * @version 1.0 - */ -package org.openoffice.helper; - -import java.io.*; - - -public class DefaultNamespaceRemover -{ - private static final boolean debug = false; - - public static void main (String argv []) - { - - if (argv.length != 2){ - System.err.println("Usage: "); - System.err.println("DefaultNamespaceRemover "); - System.exit(1); - } - - //****************************** - //parse and write the html file - //****************************** - try{ - - BufferedReader in = new BufferedReader(new InputStreamReader (new FileInputStream (argv[0]), "UTF8")); - BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(argv[1]), "UTF8")); - String sLine = null; - StringBuffer sBuffer = null; - boolean isNamespaceRemoved = false; - int nodeIndex1 = -1; - int nodeIndex2 = -1; - int delimiterIndex1 = -1; - int delimiterIndex2 = -1; - String lineEnd = System.getProperty("line.separator"); - - while((sLine = in.readLine()) != null) - { - // as long the namespace has to be removed - if(isNamespaceRemoved){ - out.write(sLine + lineEnd); - if(debug) System.out.println(sLine + lineEnd); - }else{ - //see if a defaultnamespace exists in the input line - if((nodeIndex1 = sLine.indexOf("xmlns=")) != -1 || (nodeIndex2 = sLine.indexOf("xmlns =")) != -1) - { - // take the valid starting point of the default namespace node - if(nodeIndex1 == -1) - nodeIndex1 = nodeIndex2; - - // for possible delimiter " see if it exist after default namespace node, then get the next - if((delimiterIndex1 = sLine.indexOf('\"', nodeIndex1)) != -1) - delimiterIndex1 = sLine.indexOf('\"', delimiterIndex1 + 1); - - // for possible delimiter ' see if it exist after default namespace node, then get the next - if((delimiterIndex2 = sLine.indexOf('\'', nodeIndex2)) != -1) - delimiterIndex2 = sLine.indexOf('\'', delimiterIndex2 + 1); - - // if the first delimiter ('"') does not exist in string, take the other for granted - if(delimiterIndex1 == -1) - delimiterIndex1 = delimiterIndex2; - // otherwise both delimiters exist, so get the first - else if(delimiterIndex2 != -1) - if(delimiterIndex2 < delimiterIndex1) - delimiterIndex1 = delimiterIndex2; - - sBuffer = new StringBuffer(sLine); - // +2 for the delimiter itself and the following space - sBuffer.delete(nodeIndex1, delimiterIndex1 + 2); - out.write(new String(sBuffer) + lineEnd); - if(debug) System.out.println(new String(sBuffer) + lineEnd); - isNamespaceRemoved = true; - }else{ - out.write(sLine + lineEnd); - if(debug) System.out.println(sLine + lineEnd); - } - } - } - in.close(); - out.flush(); - if(out != null) - out.close(); - } - catch(Exception e) - { - System.out.println("Error by parsing the html file: "+e.getMessage()); - e.printStackTrace(); - } - } -} diff --git a/officecfg/org/openoffice/helper/PrettyPrinter.java b/officecfg/org/openoffice/helper/PrettyPrinter.java index cbae59a4d57f..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/helper/PrettyPrinter.java +++ b/officecfg/org/openoffice/helper/PrettyPrinter.java @@ -1,297 +0,0 @@ -/** - * Title: pretty printing for xml files - * Description: Validates an xml document against a dtd

- * Copyright: null

- * Company: null

- * @author Dirk Grobler - * @version 1.4 - */ -package org.openoffice.helper; - -import java.io.*; -import org.xml.sax.*; -import javax.xml.parsers.SAXParserFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; - -public class PrettyPrinter extends HandlerBase -{ - /* for debugging - static private java.io.PrintWriter logf = null; - private void log(String msg) { logf.println(msg); } - private void logcall(String method) - { log( indentLevel + ": " + method + "()" ); } - private void logcall(String method,String arg) - { log( indentLevel + ": " + method + "(\""+arg+"\")" ); } - private void logcall(String method,String arg, Object arg2) - { log( indentLevel + ": " + method + "(\""+arg+"\", " + arg2 + ")" ); } - /* -- */ - - public static void main (String argv []) - { - if (argv.length != 2) { - System.err.println ("Usage: cmd filename outfile"); - System.exit (1); - } - - // Use the validating parser - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(false); - try { - - // logf = new java.io.PrintWriter(new BufferedWriter( new OutputStreamWriter(new FileOutputStream(argv[1]+".pp.log"), "UTF8"))); - - // Set the output file - out = new java.io.BufferedWriter(new OutputStreamWriter(new FileOutputStream(argv[1]), "UTF8")); - - // Parse the input - SAXParser saxParser = factory.newSAXParser(); - saxParser.parse( new File(argv [0]), new PrettyPrinter() ); - - if (out != null) - out.close(); - - // logf.close(); - - } catch (SAXParseException spe) { - // Error generated by the parser - System.out.println ("\n** Parsing error" - + ", line " + spe.getLineNumber () - + ", uri " + spe.getSystemId ()); - System.out.println(" " + spe.getMessage() ); - - // Use the contained exception, if any - Exception x = spe; - if (spe.getException() != null) - x = spe.getException(); - x.printStackTrace(); - - } catch (SAXException sxe) { - // Error generated by this application - // (or a parser-initialization error) - Exception x = sxe; - if (sxe.getException() != null) - x = sxe.getException(); - x.printStackTrace(); - - } catch (ParserConfigurationException pce) { - // Parser with specified options can't be built - pce.printStackTrace(); - - } catch (IOException ioe) { - // I/O error - ioe.printStackTrace(); - } - - System.exit (0); - } - - static private java.io.BufferedWriter out = null; - private String indentString = "\t"; // Amount to indent - private boolean bHasContentOrSubElements = true; - private int indentLevel = 0; - - private static int NONE = 0; - private static int START_ELEMENT = 1; - private static int CONTENT = 2; - private static int END_ELEMENT = 3; - private int nStatus = NONE; - - //=========================================================== - // replacing XML conform - //=========================================================== - private String transform(String aSource) - { - int nLen = aSource.length(); - StringBuffer aBuffer = new StringBuffer(nLen); - for (int i = 0; i < nLen; i++) - { - char c = aSource.charAt(i); - switch (c) - { - case '<': - aBuffer.append("<"); - break; - case '>': - aBuffer.append(">"); - break; - case '&': - aBuffer.append("&"); - break; - case '"': - aBuffer.append("""); - break; - case '\'': - aBuffer.append("'"); - break; - default: - aBuffer.append(c); - } - } - return aBuffer.toString(); - } - - //=========================================================== - // SAX DocumentHandler methods - //=========================================================== - - public void setDocumentLocator (Locator l) - { - } - - public void startDocument () - throws SAXException - { - // logcall( "startDocument" ); - emit (""); - nl(); - } - - public void endDocument () - throws SAXException - { - // logcall( "endDocument" ); - nl(); - try { - nl(); - out.flush (); - } catch (IOException e) { - throw new SAXException ("I/O error", e); - } - } - - public void startElement (String name, AttributeList attrs) - throws SAXException - { - // logcall( "startElement", name, attrs ); - if (indentLevel != 0 && (nStatus == START_ELEMENT)) - emit (">"); - - nStatus = START_ELEMENT; - - nl(); emit ("<"+ name); - if (attrs != null) { - for (int i = 0; i < attrs.getLength (); i++) { - emit (" "); - emit (attrs.getName (i)); - emit ("="); - emit ("\""); - emit (transform(attrs.getValue (i))); - emit ("\""); - } - } - indentLevel++; - } - - public void endElement (String name) - throws SAXException - { - // logcall( "endElement", name ); - indentLevel--; - if (nStatus == START_ELEMENT) - emit ("/>"); - else - { - // treat the value special - if (nStatus != CONTENT) -// if (name != "value" && name != "defaultvalue") - nl(); - emit (""); - } - nStatus = END_ELEMENT; - } - - public void characters (char buf [], int offset, int len) - throws SAXException - { - String s = new String(buf, offset, len); - - // ignore some whitespace (particularly isolated linebreaks) - if (nStatus != CONTENT && s.trim().equals("")) - { - // Q: reroute to ignorableWhitespace ? - if (nStatus != START_ELEMENT || - s.equals("\n") || s.equals("\r") || - s.equals(System.getProperty("line.separator")) ) - { - // logcall("#ignored# characters",s); - return; - } - } - - // logcall("characters",s); - if (nStatus == START_ELEMENT) - emit (">"); - emit(transform(s)); - nStatus = CONTENT; - } - - public void ignorableWhitespace (char buf [], int offset, int len) - throws SAXException - { - // Q: actually ignore this ? - - String s = new String(buf, offset, len); - // logcall("ignorableWhitespace",s); - if (nStatus == START_ELEMENT) - emit (">"); - emit(transform(s)); - nStatus = CONTENT; - } - - public void processingInstruction (String target, String data) - throws SAXException - { - } - - //=========================================================== - // SAX ErrorHandler methods - //=========================================================== - - // treat validation errors as fatal - public void error (SAXParseException e) - throws SAXParseException - { - throw e; - } - - // dump warnings too - public void warning (SAXParseException err) - throws SAXParseException - { - System.out.println ("** Warning" - + ", line " + err.getLineNumber () - + ", uri " + err.getSystemId ()); - System.out.println(" " + err.getMessage ()); - } - - //=========================================================== - // Helpers ... - //=========================================================== - - // Wrap I/O exceptions in SAX exceptions, to - // suit handler signature requirements - private void emit (String s) - throws SAXException - { - try { - out.write (s); - } catch (IOException e) { - throw new SAXException ("I/O error", e); - } - } - - // Start a new line - // and indent the next line appropriately - private void nl () - throws SAXException - { - String lineEnd = System.getProperty("line.separator"); - try { - out.write (lineEnd); - for (int i=0; i < indentLevel; i++) out.write(indentString); - } catch (IOException e) { - throw new SAXException ("I/O error", e); - } - } -} diff --git a/officecfg/org/openoffice/helper/Validator.java b/officecfg/org/openoffice/helper/Validator.java index 6802f0bcbe60..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/helper/Validator.java +++ b/officecfg/org/openoffice/helper/Validator.java @@ -1,163 +0,0 @@ -/** - * Title: Validation of xml files - * Description: Validates an xml document against a dtd

- * Copyright: null

- * Company: null

- * @author Dirk Grobler - * @version 1.0 - */ -package org.openoffice.helper; - -import java.io.*; -import org.xml.sax.*; -import javax.xml.parsers.SAXParserFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; - -public class Validator extends HandlerBase -{ - public static void main (String argv []) - { - if (argv.length != 1) { - System.err.println ("Usage: cmd filename"); - System.exit (1); - } - // Use the validating parser - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(true); - try - { - // Set up output stream - out = new OutputStreamWriter (System.out, "UTF8"); - - // Parse the input - SAXParser saxParser = factory.newSAXParser(); - saxParser.parse( new File(argv [0]), new Validator() ); - } - catch (SAXParseException spe) { - // Error generated by the parser - System.out.println ("\n** Parsing error" - + ", line " + spe.getLineNumber () - + ", uri " + spe.getSystemId ()); - System.out.println(" " + spe.getMessage() ); - System.exit (1); - } - catch (SAXException sxe) { - // Error generated by this application - // (or a parser-initialization error) - Exception x = sxe; - if (sxe.getException() != null) - x = sxe.getException(); - x.printStackTrace(); - System.exit (1); - } - catch (ParserConfigurationException pce) { - // Parser with specified options can't be built - pce.printStackTrace(); - System.exit (1); - - } - catch (IOException ioe) { - // I/O error - ioe.printStackTrace(); - System.exit (1); - } - - System.exit (0); - } - - //=========================================================== - // SAX DocumentHandler methods - //=========================================================== - public InputSource resolveEntity(java.lang.String publicId, - java.lang.String systemId) - throws SAXException - { - return new InputSource(systemId); - } - - static private Writer out; - //=========================================================== - // SAX DocumentHandler methods - //=========================================================== - - public void setDocumentLocator (Locator l) - { - // Save this to resolve relative URIs or to give diagnostics. - try { - out.write ("** Start validating: "); - out.write (l.getSystemId()); - out.flush (); - } catch (IOException e) { - // Ignore errors - } - } - - public void startDocument () - throws SAXException - { - } - - public void endDocument () - throws SAXException - { - nl(); emit ("** Document is valid!"); - try { - nl(); - out.flush (); - } catch (IOException e) { - throw new SAXException ("I/O error", e); - } - } - - //=========================================================== - // SAX ErrorHandler methods - //=========================================================== - - // treat validation errors as fatal - public void error (SAXParseException e) - throws SAXParseException - { - throw e; - } - - // dump warnings too - public void warning (SAXParseException err) - throws SAXParseException - { - System.out.println ("** Warning" - + ", line " + err.getLineNumber () - + ", uri " + err.getSystemId ()); - System.out.println(" " + err.getMessage ()); - } - - //=========================================================== - // Helpers ... - //=========================================================== - - // Wrap I/O exceptions in SAX exceptions, to - // suit handler signature requirements - private void emit (String s) - throws SAXException - { - try { - out.write (s); - out.flush (); - } catch (IOException e) { - throw new SAXException ("I/O error", e); - } - } - - // Start a new line - // and indent the next line appropriately - private void nl () - throws SAXException - { - String lineEnd = System.getProperty("line.separator"); - try { - out.write (lineEnd); - } catch (IOException e) { - throw new SAXException ("I/O error", e); - } - } -} diff --git a/officecfg/org/openoffice/helper/makefile.mk b/officecfg/org/openoffice/helper/makefile.mk index a230f037f8c0..e69de29bb2d1 100644 --- a/officecfg/org/openoffice/helper/makefile.mk +++ b/officecfg/org/openoffice/helper/makefile.mk @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.12 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=officecfg -TARGET =schema -PACKAGE=org$/openoffice$/helper - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -JARFILES = xml-apis.jar xercesImpl.jar - -JAVACLASSFILES= \ - $(CLASSDIR)$/$(PACKAGE)$/DefaultNamespaceRemover.class \ - $(CLASSDIR)$/$(PACKAGE)$/Validator.class \ - $(CLASSDIR)$/$(PACKAGE)$/PrettyPrinter.class - -JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) - -RC_SUBDIRSDEPS=$(JAVATARGET) - -JARCLASSDIRS = $(PACKAGE) -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.IF "$(JARTARGETN)"!="" -$(JARTARGETN) : $(JAVACLASSFILES) $(JAVATARGET) -.ENDIF # "$(JARTARGETN)"!="" - diff --git a/officecfg/prj/d.lst b/officecfg/prj/d.lst index 7a02091a2ae0..106501f96cf2 100644 --- a/officecfg/prj/d.lst +++ b/officecfg/prj/d.lst @@ -56,7 +56,6 @@ mkdir: %_DEST%\pck%_EXT% ..\%__SRC%\misc\*.map %_DEST%\pck%_EXT% ..\%__SRC%\bin\*.zip %_DEST%\pck%_EXT% -..\%__SRC%\class\*.jar %_DEST%\bin%_EXT% mkdir: %_DEST%\xml%_EXT%\processing -- cgit