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.
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.
Created attachment 9969 [details] XML Schema that does not validate
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.
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.
Created attachment 9981 [details] Proposed patch
Fixed in trunk, patch attached, Martin could you retest, Tomas could you review the patch. Thank you.
URL <http://sourceforge.net/tracker/index.php?func=detail&aid=723033&group_id=29449&atid=396222> points to SAX RFE that would help us eliminate marking at all.
Verified in trunk.
The fix is OK.
Waiting for INF approval...
approved for 3.5
Backported to release35 branch.
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 not. Is there some reason for that?
It's probably related to issue #34687.
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.
Created attachment 10911 [details] Crimson compatability patch
Crimson parser treats InputSource in different way that the implementation was not aware of. Fixed in prj40_prototype branch.
Should be Fixed by next Q-build.
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.
v