|
|
@ -215,10 +215,13 @@ public class ManifestParser extends DefaultHandler { |
|
|
|
attributes.getValue("dest"))); //$NON-NLS-1$
|
|
|
|
attributes.getValue("dest"))); //$NON-NLS-1$
|
|
|
|
} else if ("include".equals(qName)) { //$NON-NLS-1$
|
|
|
|
} else if ("include".equals(qName)) { //$NON-NLS-1$
|
|
|
|
String name = attributes.getValue("name"); //$NON-NLS-1$
|
|
|
|
String name = attributes.getValue("name"); //$NON-NLS-1$
|
|
|
|
InputStream is = null; |
|
|
|
|
|
|
|
if (includedReader != null) { |
|
|
|
if (includedReader != null) { |
|
|
|
try { |
|
|
|
try (InputStream is = includedReader.readIncludeFile(name)) { |
|
|
|
is = includedReader.readIncludeFile(name); |
|
|
|
if (is == null) { |
|
|
|
|
|
|
|
throw new SAXException( |
|
|
|
|
|
|
|
RepoText.get().errorIncludeNotImplemented); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
read(is); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
throw new SAXException(MessageFormat.format( |
|
|
|
throw new SAXException(MessageFormat.format( |
|
|
|
RepoText.get().errorIncludeFile, name), e); |
|
|
|
RepoText.get().errorIncludeFile, name), e); |
|
|
@ -226,22 +229,13 @@ public class ManifestParser extends DefaultHandler { |
|
|
|
} else if (filename != null) { |
|
|
|
} else if (filename != null) { |
|
|
|
int index = filename.lastIndexOf('/'); |
|
|
|
int index = filename.lastIndexOf('/'); |
|
|
|
String path = filename.substring(0, index + 1) + name; |
|
|
|
String path = filename.substring(0, index + 1) + name; |
|
|
|
try { |
|
|
|
try (InputStream is = new FileInputStream(path)) { |
|
|
|
is = new FileInputStream(path); |
|
|
|
read(is); |
|
|
|
} catch (IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
throw new SAXException(MessageFormat.format( |
|
|
|
throw new SAXException(MessageFormat.format( |
|
|
|
RepoText.get().errorIncludeFile, path), e); |
|
|
|
RepoText.get().errorIncludeFile, path), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (is == null) { |
|
|
|
|
|
|
|
throw new SAXException( |
|
|
|
|
|
|
|
RepoText.get().errorIncludeNotImplemented); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
read(is); |
|
|
|
|
|
|
|
} catch (IOException e) { |
|
|
|
|
|
|
|
throw new SAXException(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|