Definition Type: Element
Name: array
Namespace: http://www.xml-cml.org/schema
Type: string:http://www.w3.org/2001/XMLSchema
Containing Schema: schema.xsd
Abstract
Documentation:
A homogenous 1 dimensional array of similar object. These can be encoded as strings (i.e. XSD-like datatypes) and are concatenated as string content. The size of the array should always be >= 1. The default delimiter is whitespace. The _normalize-space()_ function of XSLT could be used to normalize all whitespace to single spaces and this should not affect the value of the array elements. To extract the elements __java.lang.StringTokenizer__ could be used. If the elements themselves contain whitespace then a different delimiter must be used and is identified through the delimiter attribute. This method is mandatory if it is required to represent empty strings. If a delimiter is used it MUST start and end the array - leading and trailing whitespace is ignored. Thus size+1 occurrences of the delimiter character are required. If non-normalized whitespace is to be encoded (e.g. newlines, tabs, etc) you are recommended to translate it character-wise to XML character entities. Note that normal Schema validation tools cannot validate the elements of array (they are defined as string) However if the string is split, a temporary schema can be constructed from the type and used for validation. Also the type can be contained in a dictionary and software could decide to retrieve this and use it for validation. When the elements of the array are not simple scalars (e.g. scalars with a value and an error, the scalars should be used as the elements. Although this is verbose, it is simple to understand. If there is a demand for more compact representations, it will be possible to define the syntax in a later version. the size attribute is not mandatory but provides a useful validity check): <h:div class="example" href="array2.xml"> <h:p>Note that the second array-element is the empty string ''.</h:p></h:div> <h:div class="example" href="array3.xml"></h:div>
Collapse XSD Schema Diagram:
Drilldown into unitType in schema schema_xsd Drilldown into unitType in schema schema_xsd Drilldown into multiplierToSI in schema schema_xsd Drilldown into multiplierToSI in schema schema_xsd Drilldown into constantToSI in schema schema_xsd Drilldown into constantToSI in schema schema_xsd Drilldown into ref in schema schema_xsd Drilldown into ref in schema schema_xsd Drilldown into size in schema schema_xsd Drilldown into size in schema schema_xsd Drilldown into delimiter in schema schema_xsd Drilldown into delimiter in schema schema_xsd Drilldown into units in schema schema_xsd Drilldown into units in schema schema_xsd Drilldown into maxValueArray in schema schema_xsd Drilldown into maxValueArray in schema schema_xsd Drilldown into minValueArray in schema schema_xsd Drilldown into minValueArray in schema schema_xsd Drilldown into errorBasis in schema schema_xsd Drilldown into errorBasis in schema schema_xsd Drilldown into errorValueArray in schema schema_xsd Drilldown into errorValueArray in schema schema_xsd Drilldown into dataType in schema schema_xsd Drilldown into dataType in schema schema_xsd Drilldown into dictRef in schema schema_xsd Drilldown into dictRef in schema schema_xsd Drilldown into convention in schema schema_xsd Drilldown into convention in schema schema_xsd Drilldown into id in schema schema_xsd Drilldown into id in schema schema_xsd Drilldown into title in schema schema_xsd Drilldown into title in schema schema_xsdXSD Diagram of array in schema schema_xsd (Chemical Markup Language (CML))
Collapse XSD Schema Code:
<xsd:element name="array" id="el.array">
    <xsd:annotation>
        <xsd:documentation>
            <h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">A homogenous 1 dimensional array of similar object.</h:div>
            <h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">These can be encoded as strings (i.e. XSD-like datatypes) and are concatenated as string content. The size of the array should always be &gt;= 1. The default delimiter is whitespace. The _normalize-space()_ function of XSLT could be used to normalize all whitespace to single spaces and this should not affect the value of the array elements. To extract the elements __java.lang.StringTokenizer__ could be used. If the elements themselves contain whitespace then a different delimiter must be used and is identified through the <h:tt>delimiter</h:tt> attribute. This method is mandatory if it is required to represent empty strings. If a delimiter is used it MUST start and end the array - leading and trailing whitespace is ignored. Thus <h:tt>size+1</h:tt> occurrences of the delimiter character are required. If non-normalized whitespace is to be encoded (e.g. newlines, tabs, etc) you are recommended to translate it character-wise to XML character entities.
                <h:p>Note that normal Schema validation tools cannot validate the elements
         of <h:b>array</h:b> (they are defined as <h:tt>string</h:tt>) However if the string is
         split, a temporary schema 
         can be constructed from the type and used for validation. Also the type
         can be contained in a dictionary and software could decide to retrieve this
         and use it for validation.</h:p>
                <h:p>When the elements of the <h:tt>array</h:tt> are not simple scalars
         (e.g. <h:a href="el.scalar">scalar</h:a>s with a value and an error, the 
         <h:tt>scalar</h:tt>s should be used as the elements. Although this is 
         verbose, it is simple to understand. If there is a demand for
         more compact representations, it will be possible to define the
         syntax in a later version.</h:p>
            </h:div>
            <h:div class="example" href="array1.xml" xmlns:h="http://www.w3.org/1999/xhtml">
                <h:p>the <h:tt>size</h:tt> attribute is not mandatory but provides a useful validity
         check): </h:p>
            </h:div>
            <!--         
            <h:div class="example" href="array2.xml">
                <h:p>Note that the second array-element is the empty string ''.</h:p></h:div>
            <h:div class="example" href="array3.xml"></h:div>
-->
        </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attributeGroup ref="title" />
                <xsd:attributeGroup ref="id" />
                <xsd:attributeGroup ref="convention" />
                <xsd:attributeGroup ref="dictRef" />
                <xsd:attributeGroup ref="dataType" />
                <xsd:attributeGroup ref="errorValueArray" />
                <xsd:attributeGroup ref="errorBasis" />
                <xsd:attributeGroup ref="minValueArray" />
                <xsd:attributeGroup ref="maxValueArray" />
                <xsd:attributeGroup ref="units" />
                <xsd:attributeGroup ref="delimiter" />
                <xsd:attributeGroup ref="size" />
                <xsd:attributeGroup ref="ref" />
                <xsd:attributeGroup ref="constantToSI">
                    <xsd:annotation>
                        <xsd:documentation>
                            <h:div class="specific" xmlns:h="http://www.w3.org/1999/xhtml">Alternative to units</h:div>
                            <h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">Must be used in conjunction with unitType</h:div>
                            <h:div class="curation" xmlns:h="http://www.w3.org/1999/xhtml">2005-10-26: added</h:div>
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attributeGroup>
                <xsd:attributeGroup ref="multiplierToSI">
                    <xsd:annotation>
                        <xsd:documentation>
                            <h:div class="specific" xmlns:h="http://www.w3.org/1999/xhtml">Alternative to units</h:div>
                            <h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">Must be used in conjunction with unitType</h:div>
                            <h:div class="curation" xmlns:h="http://www.w3.org/1999/xhtml">2005-10-26: added</h:div>
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attributeGroup>
                <xsd:attributeGroup ref="unitType">
                    <xsd:annotation>
                        <xsd:documentation>
                            <h:div class="specific" xmlns:h="http://www.w3.org/1999/xhtml">Alternative to units</h:div>
                            <h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">Must be used in conjunction with multiplierToSI and/or constantToSI</h:div>
                            <h:div class="curation" xmlns:h="http://www.w3.org/1999/xhtml">2005-10-26: added</h:div>
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attributeGroup>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
</xsd:element>
Collapse Child Attributes:
Name Type Default Value Use
title nsA:title (Optional)
id nsA:id (Optional)
convention nsA:convention (Optional)
dictRef nsA:dictRef (Optional)
dataType nsA:dataType (Optional)
errorValueArray nsA:errorValueArray (Optional)
errorBasis nsA:errorBasis (Optional)
minValueArray nsA:minValueArray (Optional)
maxValueArray nsA:maxValueArray (Optional)
units nsA:units (Optional)
delimiter nsA:delimiter (Optional)
size nsA:size (Optional)
ref nsA:ref (Optional)
constantToSI nsA:constantToSI (Optional)
multiplierToSI nsA:multiplierToSI (Optional)
unitType nsA:unitType (Optional)