#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    206
    Rep Power
    15

    problem with relative paths


    Hi all,

    I'm using xalan1.5.0 and I have a problem when I want to transform a xml file.
    The problem seems to be that the path for the DTD in the xml file is relative.
    Code:
    <!DOCTYPE Forms SYSTEM "../schemas/xddm.dtd">
    If I want to transform the file I get the following error message:
    Code:
    Fatal Error at (file source\elementlist.xml, line 2, column 46): An exception oc
    curred! Type:XMLPlatformException, Message:The base path had too few levels to w
    eave in relative part
    SAXParseException: An exception occurred! Type:XMLPlatformException, Message:The
     base path had too few levels to weave in relative part (source\elementlist.xml,
     line 2, column 46)
    If I change the path from relative to absolute there occur no errors.

    Any help is appreciated.

    Regards

    Oliver
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Chennai(Madras)
    Posts
    13
    Rep Power
    0

    solution to the relative path


    hi,

    In java related programs, use the following syntax
    file:\\\d:\somethingdirectory


    note that three slashes should be given after the file: and full path
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    206
    Rep Power
    15
    The problem is that I don't wanna use the absolute path but the relative.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Chennai(Madras)
    Posts
    13
    Rep Power
    0

    reply to the relative path


    hi,

    you have used forward slashes that is why sax parser generates errors. I used the following the same which is given below

    <?xml-stylesheet type="text/css" href="..\XSLT\src\Dev.xsl"?>
    <!DOCTYPE xml SYSTEM "..\dtds\Dev.dtd">
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    206
    Rep Power
    15
    I do not use SAX I use XALAN (see above).
    That's only a problem with XALAN and I would like to have a solution for this processor.

IMN logo majestic logo threadwatch logo seochat tools logo