|
From: Mark F. B. <sa...@co...> - 2004-11-27 16:56:13
|
Hi again (Mark Bean here from home) I think it is time for a phone conference, ASAP please. This note documents in detail changes Maren and I made (below). Please search for HELP if you are conversant with XML Schema. At this point we are lacking needed expertise and the HELP tags areas where we have questions. Maren's 1.3 version validates in VisualStudio.Net and XMLSpy. (1) There is a proposal on the board to allow multiple VectorSets. No answer from Mark Mullins or anyone else yet as to whether that is a good option. (2) Before that, Vector.Length. There is none! I remember in our discussions that we felt we should omit lengths unless they were needed, and I felt pretty sure that any Base65 conversion algorithm would provide a length for array dimensioning. Here is the C# conversion code: // Decode a GAML-type XData or YData Base64 string to array of doubles public double[] B64ToDblArr(string crdString) { return ByteToDouble(Convert.FromBase64String(crdString)); } As you can see, the array is dimensioned and filled without needing to know the length. I don't know if other algorithms work the same way, but it is possible. What we wanted to avoid was having to parse the XML file to find the length and then reparse it to obtain the values. As a result, VectorSet has Length but Vector does not. (2) LCMS reports have summed spectra from multiple regions. Maren suggested using a timeline with the first data point of each region. I had actually thought to use the "peak retention time", but am not sure that is generally applicable. What do you think? (4) AnIML Schema Changes up to version 1.3 Line numbers in v. 1.0 in brown. 1.03 version in red lines 2 MF (unnecessary XMLSPY entries) <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Maren Fiege (Creon·Lab·Control AG) --> <!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Maren Fiege (Waters) --> line 316 MF (HELP no explanation yet -see letter of Nov 26) removed the following from v.1.0 <xs:keyref name="vectorIDRef" refer="vectorID"> <xs:selector xpath="."/> <xs:field xpath="@vector"/> </xs:keyref> line 606 (MFB XMLSpy validation error: "Not a valid restriction since its "maxOccurs" value <unbounded> is greater than "1".) This is because the base complex type "ParameterValueType" has no such maxOccurs. The rule is that in order to define by restriction from a base complex type, one must only restrict, not extend. I fixed this by setting the base xs:choice to unbounded as well. <xs:choice> changed to <xs:choice maxOccurs="unbounded"> ---------------------------------------------------------------------------- - line 165 MB HELP. I don't think my fix is quite right yet. (XMLSpy: "The complex type "no name" has multiple Attribute Definitions (e.g. "templateid") whose type defintions is derived from "ID"). ID attributes are required to be unique. I believe the problem here is that the attributeGroup "SignableItem" has an attribute whose name is ID and type is xs:ID and that this Template element has this group by reference as well as another atrribute of the same type. "symbol space for unique IDs is the entire document, while for unique keys it is the target scope of the XPath. This is particularly useful if uniqueness is needed in two overlapping value spaces with different scopes in the same XML document. An example of this would be an XML document that contained room numbers and table numbers for a hotel. " added to element name Template <xs:unique name="templateIdKey"> <xs:selector xpath="." /> <xs:field xpath="@templateId" /> </xs:unique> and also line 144 MB <xs:attribute name="templateUsed" type="xs:IDREF" use="optional"/> changed to <xs:attribute name="templateUsed" type="xs:string" use="optional" /> and also line 162 MB <xs:attribute name="templateId" type="xs:ID" use="required"/> changed to <xs:attribute name="templateId" type="xs:string" use="required" /> ---------------------------------------------------------------------------- - MAJOR CHANGES TO derivation from by restriction (ExperimentStepType and TemplateType). The problem is that derivation by restriction must contain all the original tags and no others, being able only to restrict the original value ranges. Derivation by extension might be better, but I couldn't get it to work so opted simply to create a new <xs:complexType name="Technique">. HELP needed to derive by extension ---------------------------------------------------------------------------- ------ line 450...459 removed the following from v. 1.0 <xs:keyref name="sampleIDUsage" refer="sampleID"> <xs:selector xpath="."/> <xs:field xpath="@sampleID"/> </xs:keyref> and moved it to outside the ComplexType but still inside SamplesUsed element <xs:keyref name="sampleIDUsage" refer="sampleID"> <xs:selector xpath=".//SamplesUsed" /> <xs:field xpath="SampleRef/@sampleID" /> </xs:keyref> <xs:complexType name="ExperimentStepType"> line 491... MFB commented out derivation by extension (note that <!-- .... --> comments out all enclosed XML) <!--xs:element name="Technique" minOccurs="0"> <xs:annotation> <xs:documentation>Reference to Technique used in this Experiment.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Extension" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Reference to Extension to amend Technique.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="uri" type="xs:anyURI" use="required"> <xs:annotation> <xs:documentation>URI where Extension file can be fetched.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="name" type="xs:token" use="required"> <xs:annotation> <xs:documentation>Name of Extension to be used. Must match Name given in Extension Definition file.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> <xs:attributeGroup ref="SignableItemWithName"/> <xs:attribute name="uri" type="xs:anyURI" use="required"> <xs:annotation> <xs:documentation>URI where Technique Definition file can be fetched.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element--> <xs:complexType name="TemplateType"> line 496...MFB commented out derivation by extension same as above <!--xs:element name="Technique" minOccurs="0"> <xs:annotation> <xs:documentation>Reference to Technique used in this Experiment.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Extension" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Reference to Extension to amend Technique.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="uri" type="xs:anyURI" use="required"> <xs:annotation> <xs:documentation>URI where Extension file can be fetched.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="name" type="xs:token" use="required"> <xs:annotation> <xs:documentation>Name of Extension to be used. Must match Name given in Extension Definition file.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> <xs:attributeGroup ref="SignableItemWithName"/> <xs:attribute name="uri" type="xs:anyURI" use="required"> <xs:annotation> <xs:documentation>URI where Technique Definition file can be fetched.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element--> line 544 (remaining close tags also commented out - some are extraneous) <!--xs:complexContent--> <!--xs:restriction base="ExperimentStepType"--> <!--/xs:restriction--> <!--/xs:complexContent--> line 893 MFB Added <xs:complexType name="Technique"> <xs:complexType name="Technique"> <xs:annotation> <xs:documentation>Reference to Technique used in this Experiment.</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="Extension" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Reference to Extension to amend Technique.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="uri" type="xs:anyURI" use="required"> <xs:annotation> <xs:documentation>URI where Extension file can be fetched.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="name" type="xs:token" use="required"> <xs:annotation> <xs:documentation>Name of Extension to be used. Must match Name given in Extension Definition file.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> <xs:attributeGroup ref="SignableItemWithName" /> <xs:attribute name="uri" type="xs:anyURI" use="required"> <xs:annotation> <xs:documentation>URI where Technique Definition file can be fetched.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> ---------------------------------------------------------------------------- ------ end of MAJOR CHANGES TO ... |