- From: Biron,Paul V <Paul.V.Biron@kp.org>
- Date: Tue, 2 Jan 2001 09:23:33 -0800
- To: "'Jane Hunter'" <jane@dstc.edu.au>, www-xml-schema-comments@w3.org
- Cc: mpeg7-ddl@darmstadt.gmd.de
> -----Original Message----- > From: Jane Hunter [SMTP:jane@dstc.edu.au] > Sent: Monday, January 01, 2001 3:19 AM > To: www-xml-schema-comments@w3.org > Cc: mpeg7-ddl@darmstadt.gmd.de > Subject: MPEG-7 Problem Issues and Queries > > Below is a list of queries raised by the MPEG-7 community whilst > developing > MPEG-7 schemas. On a lot of the issues we're fairly sure of the answer > already > but would be highly appreciative of definite clarification. > I'll try to answer the datatypes related questions and leave the structures ones for others... > regards (and best wishes for 2001), > > Jane Hunter > ----------------------------------------------- > 3. Union and IDREF > > Each IDREF must match a corresponding ID within the XML instance document > in > which it occurs. Can we expect that this rule also applies when IDREF is > used > within a <union>? According to XML Schema definition, it seems not: > > [Definition:] Union datatypes are those whose *value spaces* and > *lexical spaces* are the union of the value spaces and lexical > spaces of two or more other datatypes. > I'm not sure I understand the question, given that and IDREF is an IDREF whether it occurs as part of a union or not. Why would an IDREF not have to match an ID in the instance document when IDREF is used in a union? > Ex: > <simpleType name="referenceType"> > <union memberTypes="IDREF uriReference mpeg7:xPathType"/> > </simpleType> > > ------------------------------------------------------------------ > 4. Union and attributes > > In Sec 2.5.1.3 of XML Schema Part 2, an example is given as: > > <xsd:element name='size'> > <xsd:simpleType> > <xsd:union> > <xsd:simpleType> > <xsd:restriction base='integer'/> > </xsd:simpleType> > <xsd:simpleType> > <xsd:restriction base='string'/> > </xsd:simpleType> > </xsd:union> > </xsd:simpleType> > </xsd:element> > > A possible instance is: > > <size>1</size> > <size>large</size> > <size xsi:type='xsd:string'>1</size> > > What happens in the last instance when "size" is also declared as an > attribute? There seems no way to specify the type using xsi:type > when the size is also an attribute. > xsi:type may be used to override the default resolution strategy for union types for character data typed to be of the union in question. However, there is no way to use xsi:type to override the resolution strategy for attributes. However, this is really not a "union" questions, but rather a "xsi:type" question, because xsi:type cannot be used to specify the type of an attribute whether that attribute is declared to be of a union type or not. > ------------------------ > 5. Is it possible to both extend and restrict a locally defined > datatype simultaneously? > > Ex: > > <element name="LinearMatrix"> > <complexType> > <simpleContent> > <restriction base="mpeg7:IntegerMatrixType"> > <minInclusive value="0"/> > <maxInclusive value="65535"/> > </restriction> > > <attribute name="sizes" use="fixed" value="3 3"/> > <!-- IMPOSSIBLE both extension and restriction --> > > </simpleContent> > </complexType> > </element> > No. This is the same as with complex types...extension and restriction in a single derivation step is not possible at this time. > ------------------------------------------------------ > > 6. Is there any way to constrain the length of a locally defined > list? > > Ex: > > <element name="ColorValueIndex"> > <simpleType> > <list itemType="mpeg7:unsigned12"/> > <!-- <length value="3"/> POSSIBLE ?? --> > </simpleType> > </element> > > <simpleType> > <list itemType="mpeg7:unsigned8"/> > <!-- <minLength value="32"/> IMPOSSIBLE --> > <!-- <maxLength value="256"/> IMPOSSIBLE --> > <!-- </list> --> > </simpleType> > Yes, there is: <simpleType> <restriction> <simpleType> <list itemType='mpeg7:unsinged12'/> </simpleType> <length value='3'/> </restriction> </simpleType> <simpleType> <restriction> <simpleType> <list itemType='mpeg7:unsinged8'/> </simpleType> <minLength value='32'/> <maxLength value='256'/> </restriction> </simpleType> Hope this helps, pvb
Received on Tuesday, 2 January 2001 13:02:52 UTC