Simple list types are incorrectly handled
-----------------------------------------
Key: NXP-1653
URL: http://jira.nuxeo.org/browse/NXP-1653
Project: Nuxeo Enterprise Platform 5
Issue Type: Bug
Components: Core
Affects Versions: 5.1.1
Reporter: Bogdan Stefanescu
Assignee: Bogdan Stefanescu
Priority: Critical
Fix For: 5.1.2
Lists can be specified in two flavors using XSD:
1. using xs:list
<xs:simpleType name="keywords">
<xs:list itemType="xs:string" />
</xs:simpleType>
2. Using xs:sequence
<xs:complexType name="keywords">
<xs:sequence>
<xs:element name="item" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
The difference between the two is somewhat similar between arrays and lists:
Elements of type xs:list are written in an xml document as follow:
<keywords>nuxeo ecm seam runtime nx core</keywords>
while the elements that correspond to the complextype declaration are written
as follows:
<keywords>
<item>nuxeo</item>
<item>ecm</item>
<item>seam</item>
<item>runtime</item>
<item>nx</item>
<item>core</item>
</keywords>
So the first format (xs:list) is better represented as a java array since it
can be seen as scalar type while the second
one is better represented as a java list since it is a composite type.
-------------------
The problem in Nuxeo is that nuxeo schema treats as scalar list (arrays) any
list that have a scalar item type - which is wrong.
We can see that both examples above are list of scalar types but are very
different one of each other.
So in nuxeo schema the second list is also treated as an array which is not
normal.
The new property model on which I am working can fix this but it will have
impact on existing code - we need to check where scalar lists are used and
replace arrays with lists if the XSD declaration is made as a complexType.
This will impact dublincore schema - which I think is simpler to fix but also
client schemas (like GIEDE schemas)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets