This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5272 - Can a data element contain more than one document ?
Summary: Can a data element contain more than one document ?
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Interchange Format (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: LC
Assignee: Valentina Popescu
QA Contact: SML Working Group discussion list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-16 21:28 UTC by Valentina Popescu
Modified: 2007-11-29 19:31 UTC (History)
0 users

See Also:


Attachments

Description Valentina Popescu 2007-11-16 21:28:31 UTC
I am going through the IF xsd file and the IF spec and could not find anywhere specified that a data element should contain one and only one instance of a definition or instance document.
Since this is not clearly stated and since the data element allows any content, somebody may be inclined to 'group' documents under a data element (I was asked by an external person if the spec allows this)
Comment 1 Valentina Popescu 2007-11-16 21:53:58 UTC
Just after I opened this defect I noticed this under section 5.2 which covers what  I thought was missing ( my search for 'data' element occurrences did not return this section)

Section 5.2 :

Each document in the interchange set MUST be represented in the SML-IF document >>by a separate document element<< as follows: 

   1. Each definition document in the interchange set MUST appear as a child of a model/definitions/document element. The order of the document children is not significant.
   2. Each instance document in the interchange set MUST appear as a child of a model/instances/document element. The order of the document children is not significant.

I am not closing this defect as invalid because:
1. The question I was trying to get answer to is at bit hidden under this section. The fact that only one document can be contained by a data element should be probably stated a bit sooner and be more visible.
2. In the text above, bullet 1 and 2 say that a definition or instance document appears as a child of a model/definitions/document element ; this is incorrect, it should be child of a model/definitions/document/data element
Comment 2 Pratul Dublish 2007-11-16 22:43:21 UTC
Agree with Valentina - we should be explicit that a data element can contain AT MOST ONE instance of a definition or instance document. Per Bug 5247, we need to allow the case where a data element has no instance/definition document
Comment 3 Pratul Dublish 2007-11-19 21:50:01 UTC
Pls fix as per comment #2
Comment 4 Valentina Popescu 2007-11-21 18:12:33 UTC
Changes :

- Non-Normative section, Section 4

1. Pseudo schema notation : updated comments to read
     <data>
       xs:any <!At most one definition document goes here>
     </data>

     <data>
       xs:any<!At most one instance document goes here>
     </data>

2. Below this schema, replaced :

Every document in the interchange set appears as content of a document element [...]
with
Every document in the interchange set appears as content of a document/data element [...]There can be at most one document contained by a document/data element. 

- Normative section, 5.2 SML-IF Documents :

Replaced:
Each definition document in the interchange set MUST appear as a child of a model/definitions/document element.
with:
Each definition document in the interchange set MUST appear as a child of a model/definitions/document/data element. The model/definitions/document/data element MUST contain at most one definition document.

Replaced:
Each instance document in the interchange set MUST appear as a child of a model/instances/document element.
with:
Each instance document in the interchange set MUST appear as a child of a model/instances/document/data element. The model/definitions/document/data element MUST contain at most one instance document. 
Comment 5 Valentina Popescu 2007-11-22 16:18:53 UTC
correction to changes described in comment #4


Changes for review:

- Non-Normative section, Section 4

1. Pseudo schema notation : updated comments to read
     <data>
       xs:any <!At most one definition document goes here>
     </data>

     <data>
       xs:any<!At most one instance document goes here>
     </data>

2. Below this schema, replaced :

Every document in the interchange set appears as content of a document element
[...]
with
Every document in the interchange set appears as content of a document
element [...] There can be at most one embedded document contained by a document/data element.

- Normative section, 5.2 SML-IF Documents :

Replaced:
Each definition document in the interchange set MUST appear as a child of a
model/definitions/document element.
with:
Each definition document in the interchange set MUST appear as a child of a
model/definitions/document element. There can be at most one definition document embedded in each model/definitions/document/data element. 

Replaced:
Each instance document in the interchange set MUST appear as a child of a
model/instances/document element.
with:
Each instance document in the interchange set MUST appear as a child of a
model/instances/document element. There can be at most one instance document embedded in each model/definitions/document/data element.