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 32939 - "Mark Invalid" error when validating XML Schema
Summary: "Mark Invalid" error when validating XML Schema
Alias: None
Product: xml
Classification: Unclassified
Component: Schema (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Petr Pisl
Depends on:
Reported: 2003-04-16 10:27 UTC by vtec
Modified: 2007-09-25 01:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

XML Schema that does not validate (5.24 KB, text/xml)
2003-04-16 10:28 UTC, vtec
Proposed patch (1.11 KB, patch)
2003-04-17 09:29 UTC, _ pkuzel
Details | Diff
Crimson compatability patch (1.35 KB, patch)
2003-07-09 14:03 UTC, _ pkuzel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vtec 2003-04-16 10:27:21 UTC
When validating a bit larger XML Schema the
operation fails with following output:

Checking file:/C:/temp/Catalog_1.xsd...
Mark invalid
XML validation finished.

If the schema is reduced by removing several type
definitions, the operation is successful (it the
schema stays valid). Even when the remove works,
commenting out parts of document does not help.
This problem did not appear with Netbeans 3.4.1.
Comment 1 vtec 2003-04-16 10:28:09 UTC
Created attachment 9969 [details]
XML Schema that does not validate
Comment 2 _ pkuzel 2003-04-16 16:34:17 UTC
XMLSchema instance validation is two-phase process, in first stage
parser sniffs input_source for target namespace, then a virtual
document referencing the input_source is created and parsed. The
input_source instance is shared, code assumes that sniffing determines
target namespace in 10000bytes.

The Catalog_1.xsd target namespace is determinable in 10000bytes...
I'll have to debug it.
Comment 3 _ pkuzel 2003-04-17 09:12:01 UTC
Oh, I got it. Parser uses eager preloading. Its preload buffer is
bigger than mark retain buffer. While filling the preload buffer it
invalidates the mark because its retain buffer is too small.

It breaks XML Schema validation functionality for all schemas >5K
chars. Need to be fixed for stable release => P1.
Comment 4 _ pkuzel 2003-04-17 09:29:00 UTC
Created attachment 9981 [details]
Proposed patch
Comment 5 _ pkuzel 2003-04-17 09:31:22 UTC
Fixed in trunk, patch attached, Martin could you retest, Tomas could
you review the patch. Thank you.
Comment 6 _ pkuzel 2003-04-17 10:39:29 UTC
points to SAX RFE that would help us eliminate marking at all.
Comment 7 Martin Schovanek 2003-04-17 17:32:00 UTC
Verified in trunk.
Comment 8 Tomas Zezula 2003-04-17 17:43:15 UTC
The fix is OK.
Comment 9 _ pkuzel 2003-04-17 17:51:38 UTC
Waiting for INF approval...
Comment 10 _ ttran 2003-04-18 08:30:37 UTC
approved for 3.5
Comment 11 _ pkuzel 2003-04-18 10:23:23 UTC
Backported to release35 branch. 
Comment 12 vtec 2003-07-09 08:56:39 UTC
As original reporter of issue I have to say that with the official 3.5
release it seems to be OK. However I'll postpone status change to
VERIFIED untill brief clarification. 

With actual development build (200307090100) the Schema validation
does not work again. I can only get the
"Stream closed" message on console no matter if the schema is valid or

Is there some reason for that?
Comment 13 Martin Schovanek 2003-07-09 10:18:38 UTC
It's probably related to issue #34687.
Comment 14 _ pkuzel 2003-07-09 11:06:29 UTC
I can see it in recent project build for any schema file size.

I guess a change in Xerces implementaion behaviour e.g. that it
authomatically close input streams.
Comment 15 _ pkuzel 2003-07-09 14:03:47 UTC
Created attachment 10911 [details]
Crimson compatability patch
Comment 16 _ pkuzel 2003-07-09 14:06:11 UTC
Crimson parser treats InputSource in different way that the
implementation was not aware of.

Fixed in prj40_prototype branch.
Comment 17 Martin Schovanek 2003-07-09 14:43:24 UTC
Should be Fixed by next Q-build.
Comment 18 Petr Pisl 2003-10-22 15:35:52 UTC
The latest problem, that was reported by vtec, duplicates issue
#36170, which is different issue. I'm going close this bug, because
the #36170 I  fixed this week. 
Comment 19 Martin Schovanek 2004-03-02 10:21:20 UTC