]> source.dussan.org Git - poi.git/commitdiff
the subdir element needs to be included otherwise certain xmlbean operations (e.g...
authorAndreas Beeker <kiwiwings@apache.org>
Fri, 21 Nov 2014 01:06:39 +0000 (01:06 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Fri, 21 Nov 2014 01:06:39 +0000 (01:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1640846 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/util/OOXMLLite.java

index 0550c1a91f65c68be25ffe5289e9657f7ad57d40..64920225aed3393da41ed140754d496946283027 100644 (file)
@@ -32,6 +32,7 @@ import java.util.Map;
 import java.util.Vector;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.regex.Pattern;
 
 import junit.framework.TestCase;
 
@@ -133,10 +134,11 @@ public final class OOXMLLite {
         //finally copy the compiled .xsb files
         System.out.println("Copying .xsb resources");
         JarFile jar = new  JarFile(_ooxmlJar);
+        Pattern p = Pattern.compile("schemaorg_apache_xmlbeans/(system|element)/.*\\.xsb");
         try {
             for(Enumeration<JarEntry> e = jar.entries(); e.hasMoreElements(); ){
                 JarEntry je = e.nextElement();
-                if(je.getName().matches("schemaorg_apache_xmlbeans/system/\\w+/\\w+\\.xsb")) {
+                if(p.matcher(je.getName()).matches()) {
                      File destFile = new File(_destDest, je.getName());
                      copyFile(jar.getInputStream(je), destFile);
                 }