This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 19578 - System identifier cannot point to a DTD using a relative path
Summary: System identifier cannot point to a DTD using a relative path
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: _ pkuzel
URL:
Keywords:
: 22965 (view as bug list)
Depends on: 22940
Blocks:
  Show dependency tree
 
Reported: 2002-01-18 15:12 UTC by lordpixel
Modified: 2003-07-02 08:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lordpixel 2002-01-18 15:12:00 UTC
If this is a duplicate of one of the existing DTD bugs, then please go ahead and
resolve it as such, though I'd appreciate it if you could help me with this
specific instance of the problem.

Here's the setup I inherited

xml/
    docs/
        myxml.xml
    dtds/
        myxml.dtd

And the system idendifier in myxml.xml is:
<!DOCTYPE MyXML SYSTEM "myxml.dtd">

myxml.xml is flagged as invalid in netbeans, because the DTD cannot be found.
So I tried (which would also be valid at runtime):
<!DOCTYPE MyXML SYSTEM "../dtds/myxml.dtd">

and got this error:

External entity not found:
"nbfs:DQCQBdevQB[elided]QBsource/xml/docs/../dtds/myxml.dtd". [3] 
XML checking finished.
Now, I'm not familiar enough with XML to know if relative paths are definately
allowed in SYSTEM identifiers, but its certainly true that the setup I have has
to be reasonably common. I tried a few varients for the SYSTEM identifier,
including the full path from the project root "directory" (ie,
/xml/docs/dtds/myxml.dtd) but nothing I tried worked other than copying
myxml.dtd into the same folder as the xml file...

There needs to be some way to specify where to search for DTDs, which would
preferably be linked from the error message that comes up when one can't be
found. If relative paths are allowed in SYSTEM identifiers, then you need to
support them. Absolute paths relative to the roots of the compiler's classpath
(which is effectively the same thing as the root of the project, usually) would
be useful too.
Comment 1 _ lkramolis 2002-01-21 15:00:42 UTC
I have similar practice:

- but I am able to open such file as tree - so document is correct --
please, could you reply which version of XML module do you have?

- Check action display message (as you wrote) about not available
external entity.

- Validate action says that this document is valid, what is OK.

So, I have problems just with Check action.
Comment 2 lordpixel 2002-01-21 19:16:33 UTC
The symptoms I originally described were with the beta3 release.

With the rc1 (0.2.3) release, I see what you see... the document will
open as a tree, and it will validate, but "Check XML" fails.

With the rc2 release (0.2.5) the results are the same.
Comment 3 _ pkuzel 2002-01-21 19:41:00 UTC
The problem originates from wrong Crimson parser implementation.
Crimson parser is used only for checking. You can replace is by Xerces
(that is used for validation) by defining following JVM property:

-J-Dnetbeans.xml.FastSAXParserFactoryImpl=org.apache.xerces.jaxp.SAXParserFactoryImpl

Does it work for you?
Comment 4 _ lkramolis 2002-05-07 09:32:15 UTC
*** Issue 22965 has been marked as a duplicate of this issue. ***
Comment 5 _ lkramolis 2002-05-09 12:50:53 UTC
Waiting for issue #22940.
Comment 6 _ lkramolis 2002-05-09 13:49:01 UTC
Issue #22940 was fixed.
Comment 7 _ lkramolis 2002-05-09 13:50:27 UTC
Fixed by #22940.
Comment 8 Martin Schovanek 2002-05-24 17:01:10 UTC
VERIFIED
Comment 9 Quality Engineering 2003-07-02 08:38:10 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.