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 97269 - XSLT Editor leaves out of account the values of minOccurs and maxOccurs attributes of the elements of the target schema
Summary: XSLT Editor leaves out of account the values of minOccurs and maxOccurs attr...
Status: REOPENED
Alias: None
Product: soa
Classification: Unclassified
Component: XSLT (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Alexey Yarmolenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 12:01 UTC by Andrei Chistiakov
Modified: 2007-08-22 15:46 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2007-03-06 12:01:37 UTC
Reproduced in build 070304_3.

The XSLT Editor doesn't take into account minOccurs and maxOccurs attributes'
values of the elements of the target XML Schema. The Editor allows to add to the
target tree more instances of an element than its maxOccurs and less then its
minOccurs attributes allow.
Comment 1 Alexey Yarmolenko 2007-08-01 18:31:56 UTC
I dont think this as p2 BUG: it does not block any functionality or causes any exception to be shown.

Speaking about way to fix this problem, i dont think we need to prevent user from adding more elements than schema allows.  

The proposed behavior is to allow user to create this element and say that here he violated the target document schema
requirements. The same way diagram will behave when schema requires at least 1 element, but user created none: we will
put an error badge on corresponding schema node in target tree which will say that schema requires this element to be
present in target document.

So, these are 2 more rules to plug to validation framework, which we want to implement for XSLT diagram in the same way
we did it for BPEL. But this task is out of scoop for NB6. 

I suggest turning this bug into RFE and changing target release for somthing past NB6.
 
Comment 2 pvarghese 2007-08-22 15:46:18 UTC
The xslt editor has to be schema aware for this case and should not let the user to create or add nodes for such cases.
It could warn the user and ask that the anomaly be corrected or change the schema.
These types of issues have to be handled so that the xslt editor is of enterprise quality.
Opened the issue for sierra release