1 /* |
1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
47 |
47 |
48 public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { |
48 public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { |
49 InputSource is = lhs.resolveEntity(publicId, systemId); |
49 InputSource is = lhs.resolveEntity(publicId, systemId); |
50 if(is!=null) |
50 if(is!=null) |
51 return is; |
51 return is; |
|
52 |
|
53 if(publicId == null) { |
|
54 // WorkAround: Ant's XMLCatalog supports public IDs only, this allows us to treat it as system IDs |
|
55 publicId = systemId; |
|
56 } |
|
57 |
52 return rhs.resolveEntity(publicId, systemId); |
58 return rhs.resolveEntity(publicId, systemId); |
53 } |
59 } |
54 } |
60 } |