- From: Steve Hanson <smh@uk.ibm.com>
- Date: Fri, 02 Nov 2007 22:18:09 +0000
- To: www-xml-schema-comments@w3.org
- Message-Id: <602CEC8B-31CA-4C2F-821A-1C63F8E35644@uk.ibm.com>
This is a request submitted on behalf of the Open Grid Forum (OGF) Data Format Description Language (DFDL) work group. The purpose of a DFDL-annotated XML schema is to describe the logical structure and physical format of non-XML data. A subset of XML Schema is used to describe the logical structure of the data, and DFDL-specific xsd:appinfo annotations on schema components carry properties that describe the physical format of the data. The result of parsing a stream of DFDL described data using a conformant DFDL parser is a DFDL info set, which is structurally similar to an XML info set; specifically it consists of a 'tree' of info items which correspond to elements in the DFDL described data. There is a requirement to be able to link from a DFDL info item back to the DFDL annotated XML schema component that describes it, for the purposes of accessing the DFDL properties of that component. SCD appears to be an ideal way of specifying that link, except for one problem. DFDL annotations can be carried on various schema components, including element references and group references. However, the SCD specification at http://www.w3.org/TR/xmlschema- ref/ states: a) 2.1. "It is not a requirement to designate particle components as distinct from terms" b) 4.2.1.2. "Particle schema components are skipped over in the traversal through the graph, do not contribute a step, and have no reflection in the path syntax. " Because of this treatment of particles it does not appear that an element reference or group reference can be directly accessed using an SCD path. Therefore it is not possible to link from a DFDL info item to a DFDL annotated element reference or group reference and hence access its DFDL properties. Please can you confirm that our interpretation of the SCD specification is correct. If so, we would like to request an enhancement to SCD specification so that particles can be directly accessed using an SCD. ----------------------------- Here's why DFDL annotations on element references and group references is important. This is an excerpt from draft 025 of the DFDL specification (http://forge.gridforum.org/sf/go/doc14764?nav=1) Scoping of Element and Group References The exception to the general case concerns annotations positioned on element references and group references. When this occurs, the annotations on the reference will take precedence over any top-level annotations on the referenced element or group. Consider the mechanism of substituting an element reference declaration with the referenced elements. If annotations are present on both the element reference declaration and the referenced element, they will need to be combined in some way. The rules of DFDL dictate that those on the element reference take precedence over those on the referenced element. In the example below, the annotation on the element reference specifying a format encoding of ascii takes precedence over the utf-8 format encoding of the referenced element. <xs:element name=title ref="name"> <xs:annotation> <xs:appinfo source=http://www.ogf.org/dfdl/> <dfdl:format applies="toScope" encoding="ascii" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name=name type="xs:string"> <xs:annotation> <xs:appinfo source=http://www.ogf.org/dfdl/> <dfdl:format applies="toScope" encoding="utf-8" /> </xs:appinfo> </xs:annotation> This mechanism provides a way to establish default properties for an element declaration but provide optional overrides to them at the point of use. ------------------------------- Steve Hanson WebSphere Message Brokers Hursley, UK Internet: smh@uk.ibm.com Phone (+44)/(0) 1962-815848 Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Received on Monday, 12 November 2007 08:08:00 UTC