Bug 193187 - Datacenter target element itemRef validation needs more specific URI
Summary: Datacenter target element itemRef validation needs more specific URI
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Arwe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-18 15:51 EDT by David Whiteman CLA
Modified: 2012-01-03 13:47 EST (History)
0 users

See Also:


Attachments
Fixes XML Schema (-not- SML) validation errors (44.38 KB, patch)
2009-05-18 15:51 EDT, John Arwe CLA
dlwhiteman: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Whiteman CLA 2007-06-18 15:51:40 EDT
There are several instances where a more specific URI is needed in an itemRef in the datacenter sample.  I noticed the first instance of this when I exported the datacenter to an SML-IF file and got the following validation error:

Target Element Error: itemRef on line 2593 column 32 references dataCollection/TPTP_GenericLogAdapter/GLAControllerWin.xml that is not of type it:itemType

The data in that section is that which originally came from topology/machine2Win.xml.  At Valentina's suggestion, I changed the itemRef as follows to include an #xpointer reference, and this caused the the error to disappear:

<sml:uri>dataCollection/TPTP_GenericLogAdapter/GLAControllerWin.xml#xpointer(/gla:glaController)</sml:uri>

After running the validator again, I noticed the error occurring again in further locations.  Here's an example from topology/machine2Win.xml:

				<it:itemRef sml:ref="true">
					<sml:uri>os/windows/WindowsServer1.xml</sml:uri>
				</it:itemRef>

Since there are several examples of these, and since this is one case where the validator doesn't report multiple errors at once, I will leave finding these as an exercise for the defect assignee. :-)
Comment 1 Valentina Popescu CLA 2007-06-18 16:20:02 EDT
Thanks David; I'll fix this
Comment 2 Valentina Popescu CLA 2007-11-29 13:52:20 EST
moving target to i8
Comment 3 Valentina Popescu CLA 2008-03-03 12:41:08 EST
Ruth,
I am moving this to you so that you can reassign as you find appropriate
Comment 4 David Whiteman CLA 2009-04-02 16:03:58 EDT
John, please see if this is still valid.  Thanks!
Comment 5 John Arwe CLA 2009-04-02 16:40:59 EDT
It probably is.  This is actually a more complex question than any normal human would imagine, but then I write standards :-)

The file he changed (GLAControllerWin.xml) is not valid with respect to its schema in its original state (and at least one of its schema files is also invalid).  From a purely SML perspective, the model is invalid and that's all you can reliably say.  SML does not guarantee that a validator will give you all possible validation errors, for example.  Depending upon how the schema validation errors are fixed (if they should be, read on), the message Steve cited might also be fixed as a consequence.

I also don't know if the original intent was that this example should be a valid SML model.  Someone with more historical context would have to supply that answer, or (if it is all gone now) then the community needs to decide what kind of example it does want (it might want both valid and invalid examples).
Comment 6 David Whiteman CLA 2009-04-02 17:29:56 EDT
These defects were assigned to Steve because he was the former RM lead, and was therefore the default assignee, but I was the one who created the defects.

I was under the impression that you and Valentina had worked together on the datacenter example.  She had intended for it to be an example of a data center using SML, so yes, it should be valid.  She often asked us to make sure the validator would be able to validate the example correctly, and I don't think it ever worked all the way.  So you might not want to spend the time with this, as it might not rate high on importance, but if it doesn't take a great deal of work to get the example in the shape, I think it can be a great showcase of SML.  However, if it's too far into disrepair, we should probably remove it totally.
Comment 7 John Arwe CLA 2009-05-18 15:51:56 EDT
Created attachment 136224 [details]
Fixes XML Schema (-not- SML) validation errors

Net: integrate this patch to advance the cause, but leave the bug open since there is yet more to do.

I have the first class of errors fixed in this patch, so what is here all successfully -XML Schema- validates.  That's as far as I can get for now.  When I tried to SML-IF validate it, I got 19 "duplicate alias" errors ... and since the COSMOS code is creating the SML-IF document being validated from the directory structure, those are "suspicious" (i.e. likely to be a COSMOS code bug).  There were another 35 errors related to a moved file on the W3C site (apparently the validator plug-in is still trying to use the W3C site's SML schema somehow instead of the workspace-resident copy, and the W3C URL is now returning a name space policy document ... as it should have all along ... rather than a schema document).
Comment 8 David Whiteman CLA 2009-05-21 13:21:37 EDT
Do these changes depend on the changes for bug 276993?  Or is it safe to integrate this code without the code for 276993?
Comment 9 John Arwe CLA 2009-05-21 14:05:47 EDT
(In reply to comment #8)

The two bugs are orthogonal, so it is safe.
It even happens to be true that I coded this one first, so patching in this order actually matches the order things were done in my workspace.
Comment 10 David Whiteman CLA 2009-05-21 14:35:48 EDT
reviewed and checked in to CVS HEAD
Comment 11 David Whiteman CLA 2009-05-21 14:51:46 EDT
Oops, forgot to leave this open.  As John said, there is more to do.