[ xframe-Bugs-1362775 ] Wrong Path for included Schema's

"SourceForge.net" <[email protected]> Fri, 24 Nov 2006 13:02:53 -0800
Newsgroups gmane.text.xml.xframe.xsddoc
Message-ID <[email protected]>
Bugs item #1362775, was opened at 2005-11-21 14:28
Message generated for change (Settings changed) made by kriede
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=454391&aid=1362775&group_id=48863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ant
Group: xsddoc-1.0
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Jentra (jentra)
Assigned to: bforge (bforge)
Summary: Wrong Path for included Schema's

Initial Comment:
When specifying multiple schemas with the ant-task, the
FilUtils-Class will build the path wrong. It appends
the base dir, even, if the filename is absolute, which
leads to wrong pathes.

The atteached file will check if the filename is
absolute and in this case will not prepend the basedir.



----------------------------------------------------------------------

Comment By: Kurt Riede (kriede)
Date: 2006-11-24 22:01

Message:
Logged In: YES 
user_id=484961
Originator: NO

closed; will be available in next release 1.1

----------------------------------------------------------------------

Comment By: Kurt Riede (kriede)
Date: 2006-05-23 10:32

Message:
Logged In: YES 
user_id=484961

The applied fix is more or less the same, see here:
http://xframe.cvs.sourceforge.net/xframe/xsddoc/src/net/sf/x
frame/xsddoc/util/FileUtil.java?r1=1.8&r2=1.9

The difference is that the test for a colon is obsolete and 
thus removed, if we use the proper platform-independend 
method File.isAbsolute()).

----------------------------------------------------------------------

Comment By: DJ Gregor (djgregor)
Date: 2006-05-23 07:57

Message:
Logged In: YES 
user_id=686108

I just ran into this problem on 1.0 when running xsddoc on multiple schema

files.  I can't get to CVS right now, so I couldn't check out the changes
that 
are in HEAD, but this is my fix that I whipped up:

--- orig/xsddoc-1.0/src/net/sf/xframe/xsddoc/util/FileUtil.java 
2005-03-03 09:03:40.000000000 -0500
+++ xsddoc-1.0/src/net/sf/xframe/xsddoc/util/FileUtil.java      
2006-05-23 01:44:15.000000000 -0400
@@ -122,7 +122,8 @@
      * @return resolved location
      */
     public static String getLocation(final String baseFile, final String
file) {
-        if (baseFile == null || file.indexOf(':') > 0) {
+        if (baseFile == null || file.indexOf(':') > 0
+           || new File(file).isAbsolute()) {
             return file;
         }
         final String parent = new File(baseFile).getParent();

----------------------------------------------------------------------

Comment By: bforge (bforge)
Date: 2006-02-15 02:04

Message:
Logged In: YES 
user_id=1355310

a possible fix is now available in CVS HEAD.
May I ask you to test if the fixs works for you?

----------------------------------------------------------------------

Comment By: Kurt Riede (kriede)
Date: 2006-02-15 01:16

Message:
Logged In: YES 
user_id=484961

did you forget to attach a patch?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=454391&aid=1362775&group_id=48863

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV