short form on xs:schema?

I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412

One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg

Suman That is exactly what Mike is suggesting. If you look at Table 7 in the spec (section 7.1) and the wording about short form in section 7.1.3.3 then the natural assumption is that DFDL attributes on xs:schema would be allowed as the short form of the anonymous dfdl:format annotation's properties. If a property occurs in both short form and attribute/element form that is a schema definition error as per section 7.1.3. So, are there any reasons why this should not be allowed? I can recall this being discussed in the past but I don't remember a conclusion. The only reason I can think of is that it would easy for a human reader to miss DFDL properties on xs:schema because of all the namespace attributes that typically occur there. But that's just a formatting/style thing. Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Mike Beckerle <mbeckerle.dfdl@gmail.com> Cc: dfdl-wg@ogf.org, dfdl-wg-bounces@ogf.org Date: 05/12/2011 00:55 Subject: Re: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg 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

On another note, I am also looking at the real usefulness of providing this annotation in the short form on xs:schema as most of the time users would need a default format at the schema level referring either to DFDLFormat ( General purpose DFDL format definition) and/or containing defaults for other attributes. We may want to provide for completeness but the same argument would hold for other dfdl attributes.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Steve Hanson <smh@uk.ibm.com> To: Suman Kalia/Toronto/IBM@IBMCA Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 12/05/2011 04:49 AM Subject: Re: [DFDL-WG] short form on xs:schema? Suman That is exactly what Mike is suggesting. If you look at Table 7 in the spec (section 7.1) and the wording about short form in section 7.1.3.3 then the natural assumption is that DFDL attributes on xs:schema would be allowed as the short form of the anonymous dfdl:format annotation's properties. If a property occurs in both short form and attribute/element form that is a schema definition error as per section 7.1.3. So, are there any reasons why this should not be allowed? I can recall this being discussed in the past but I don't remember a conclusion. The only reason I can think of is that it would easy for a human reader to miss DFDL properties on xs:schema because of all the namespace attributes that typically occur there. But that's just a formatting/style thing. Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Mike Beckerle <mbeckerle.dfdl@gmail.com> Cc: dfdl-wg@ogf.org, dfdl-wg-bounces@ogf.org Date: 05/12/2011 00:55 Subject: Re: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg 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

Sorry Suman I don't understand what you are saying. The following are identical. <xs:schema dfdl:ref="block" dfdl:encoding="ASCII" ...> </xs:schema> <xs:schema ...> <xs:annotation> <xs:appinfo="www.ogf.or/dfdl/1.0"> <dfdl:format ref="block" dfdl:encoding="ASCII" /> </xs:appinfo> </xs:annotation> </xs:schema> Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Steve Hanson/UK/IBM@IBMGB Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 05/12/2011 12:28 Subject: Re: [DFDL-WG] short form on xs:schema? On another note, I am also looking at the real usefulness of providing this annotation in the short form on xs:schema as most of the time users would need a default format at the schema level referring either to DFDLFormat ( General purpose DFDL format definition) and/or containing defaults for other attributes. We may want to provide for completeness but the same argument would hold for other dfdl attributes.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Steve Hanson <smh@uk.ibm.com> To: Suman Kalia/Toronto/IBM@IBMCA Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 12/05/2011 04:49 AM Subject: Re: [DFDL-WG] short form on xs:schema? Suman That is exactly what Mike is suggesting. If you look at Table 7 in the spec (section 7.1) and the wording about short form in section 7.1.3.3 then the natural assumption is that DFDL attributes on xs:schema would be allowed as the short form of the anonymous dfdl:format annotation's properties. If a property occurs in both short form and attribute/element form that is a schema definition error as per section 7.1.3. So, are there any reasons why this should not be allowed? I can recall this being discussed in the past but I don't remember a conclusion. The only reason I can think of is that it would easy for a human reader to miss DFDL properties on xs:schema because of all the namespace attributes that typically occur there. But that's just a formatting/style thing. Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Mike Beckerle <mbeckerle.dfdl@gmail.com> Cc: dfdl-wg@ogf.org, dfdl-wg-bounces@ogf.org Date: 05/12/2011 00:55 Subject: Re: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg 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 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

Steve - Yes they should be identical.. My point was that the short form annotation on xs:schema should not just be restricted to a handful set of properties but all the dfdl properties that could be specified on the default format.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Steve Hanson <smh@uk.ibm.com> To: Suman Kalia/Toronto/IBM@IBMCA Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 12/05/2011 08:57 AM Subject: Re: [DFDL-WG] short form on xs:schema? Sorry Suman I don't understand what you are saying. The following are identical. <xs:schema dfdl:ref="block" dfdl:encoding="ASCII" ...> </xs:schema> <xs:schema ...> <xs:annotation> <xs:appinfo="www.ogf.or/dfdl/1.0"> <dfdl:format ref="block" dfdl:encoding="ASCII" /> </xs:appinfo> </xs:annotation> </xs:schema> Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Steve Hanson/UK/IBM@IBMGB Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 05/12/2011 12:28 Subject: Re: [DFDL-WG] short form on xs:schema? On another note, I am also looking at the real usefulness of providing this annotation in the short form on xs:schema as most of the time users would need a default format at the schema level referring either to DFDLFormat ( General purpose DFDL format definition) and/or containing defaults for other attributes. We may want to provide for completeness but the same argument would hold for other dfdl attributes.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Steve Hanson <smh@uk.ibm.com> To: Suman Kalia/Toronto/IBM@IBMCA Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 12/05/2011 04:49 AM Subject: Re: [DFDL-WG] short form on xs:schema? Suman That is exactly what Mike is suggesting. If you look at Table 7 in the spec (section 7.1) and the wording about short form in section 7.1.3.3 then the natural assumption is that DFDL attributes on xs:schema would be allowed as the short form of the anonymous dfdl:format annotation's properties. If a property occurs in both short form and attribute/element form that is a schema definition error as per section 7.1.3. So, are there any reasons why this should not be allowed? I can recall this being discussed in the past but I don't remember a conclusion. The only reason I can think of is that it would easy for a human reader to miss DFDL properties on xs:schema because of all the namespace attributes that typically occur there. But that's just a formatting/style thing. Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Mike Beckerle <mbeckerle.dfdl@gmail.com> Cc: dfdl-wg@ogf.org, dfdl-wg-bounces@ogf.org Date: 05/12/2011 00:55 Subject: Re: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg 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 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

Yes, agree. Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Steve Hanson/UK/IBM@IBMGB Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 05/12/2011 15:00 Subject: Re: [DFDL-WG] short form on xs:schema? Steve - Yes they should be identical.. My point was that the short form annotation on xs:schema should not just be restricted to a handful set of properties but all the dfdl properties that could be specified on the default format.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Steve Hanson <smh@uk.ibm.com> To: Suman Kalia/Toronto/IBM@IBMCA Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 12/05/2011 08:57 AM Subject: Re: [DFDL-WG] short form on xs:schema? Sorry Suman I don't understand what you are saying. The following are identical. <xs:schema dfdl:ref="block" dfdl:encoding="ASCII" ...> </xs:schema> <xs:schema ...> <xs:annotation> <xs:appinfo="www.ogf.or/dfdl/1.0"> <dfdl:format ref="block" dfdl:encoding="ASCII" /> </xs:appinfo> </xs:annotation> </xs:schema> Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Steve Hanson/UK/IBM@IBMGB Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 05/12/2011 12:28 Subject: Re: [DFDL-WG] short form on xs:schema? On another note, I am also looking at the real usefulness of providing this annotation in the short form on xs:schema as most of the time users would need a default format at the schema level referring either to DFDLFormat ( General purpose DFDL format definition) and/or containing defaults for other attributes. We may want to provide for completeness but the same argument would hold for other dfdl attributes.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Steve Hanson <smh@uk.ibm.com> To: Suman Kalia/Toronto/IBM@IBMCA Cc: dfdl-wg@ogf.org, Mike Beckerle <mbeckerle.dfdl@gmail.com> Date: 12/05/2011 04:49 AM Subject: Re: [DFDL-WG] short form on xs:schema? Suman That is exactly what Mike is suggesting. If you look at Table 7 in the spec (section 7.1) and the wording about short form in section 7.1.3.3 then the natural assumption is that DFDL attributes on xs:schema would be allowed as the short form of the anonymous dfdl:format annotation's properties. If a property occurs in both short form and attribute/element form that is a schema definition error as per section 7.1.3. So, are there any reasons why this should not be allowed? I can recall this being discussed in the past but I don't remember a conclusion. The only reason I can think of is that it would easy for a human reader to miss DFDL properties on xs:schema because of all the namespace attributes that typically occur there. But that's just a formatting/style thing. Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Suman Kalia <kalia@ca.ibm.com> To: Mike Beckerle <mbeckerle.dfdl@gmail.com> Cc: dfdl-wg@ogf.org, dfdl-wg-bounces@ogf.org Date: 05/12/2011 00:55 Subject: Re: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg 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 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 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

Yes I was thinking of this as the short form for setting default properties. I really came up with this while trying to create very compact unit tests for the UofI Daffodil software. This is written in Scala (really the next programming language you should learn. Runs on JVM, fully integrates with Java, lots of other goodness.) Here's an example, I elipsed out the namespace properties. def testInt42() { val data = bytesFromChars("\u0000\u0000\u0000\u002A") // nice: scala has built in XML support. No string quoting hell, just write the XML (hey, that rhymes :-) val testSchema = <xs:Schema ...namespace crud... dfdl:encoding="iso-8859-1" dfdl:byteOrder="bigEndian" ...> <xs:element name="testElement" type="xs:int" dfdl:representation="binary" dfdl:lengthKind="implicit" /> </xs:Schema> val res = parser(testSchema).data(data).parse() val ans = (res \ "testElement")(0).text.asInt assertEquals(42, ans) } I think the same principles will apply to tutorial and expository materials about DFDL. I.e., I like being able to put default format properties directly on the xs:schema element! This will really only be viable for very small examples where you only need a few properties. That said, those are useful for people learning the language, and trying it out via APIs. But, I had never seen it before, and wasn't discussed, so I looked for it in the spec, and found nothing saying you can't do it. The language in the spec suggests it is allowed. ...mikeb On Dec 4, 2011 7:55 PM, "Suman Kalia" <kalia@ca.ibm.com> wrote:
One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?..
Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com
For info on Message broker
http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht...
From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org ------------------------------
I don't know that we ever talked about this.
Most schema constructs support short form
<xs:element ... dfdl:encoding="utf-8" />
Does the xs:schema itself support short form for the "default" format properties?
<xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema>
-- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg

Will discuss on today's WG call... Regards Steve Hanson Architect, Data Format Description Language (DFDL) Co-Chair, OGF DFDL Working Group IBM SWG, Hursley, UK smh@uk.ibm.com tel:+44-1962-815848 From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: Suman Kalia <kalia@ca.ibm.com> Cc: dfdl-wg@ogf.org Date: 05/12/2011 14:14 Subject: Re: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org Yes I was thinking of this as the short form for setting default properties. I really came up with this while trying to create very compact unit tests for the UofI Daffodil software. This is written in Scala (really the next programming language you should learn. Runs on JVM, fully integrates with Java, lots of other goodness.) Here's an example, I elipsed out the namespace properties. def testInt42() { val data = bytesFromChars("\u0000\u0000\u0000\u002A") // nice: scala has built in XML support. No string quoting hell, just write the XML (hey, that rhymes :-) val testSchema = <xs:Schema ...namespace crud... dfdl:encoding="iso-8859-1" dfdl:byteOrder="bigEndian" ...> <xs:element name="testElement" type="xs:int" dfdl:representation="binary" dfdl:lengthKind="implicit" /> </xs:Schema> val res = parser(testSchema).data(data).parse() val ans = (res \ "testElement")(0).text.asInt assertEquals(42, ans) } I think the same principles will apply to tutorial and expository materials about DFDL. I.e., I like being able to put default format properties directly on the xs:schema element! This will really only be viable for very small examples where you only need a few properties. That said, those are useful for people learning the language, and trying it out via APIs. But, I had never seen it before, and wasn't discussed, so I looked for it in the spec, and found nothing saying you can't do it. The language in the spec suggests it is allowed. ...mikeb On Dec 4, 2011 7:55 PM, "Suman Kalia" <kalia@ca.ibm.com> wrote: One way to view this annotation would be as if it is defined on the default format at the xs:schema.. Question would be what if dfdl:format at xs:schema also has dfdl:encoding specified - which one would win ?.. Suman Kalia IBM Canada Lab WMB Toolkit Architect and Development Lead Tel: 905-413-3923 T/L 313-3923 Email: kalia@ca.ibm.com For info on Message broker http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.ht... From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 12/02/2011 05:46 PM Subject: [DFDL-WG] short form on xs:schema? Sent by: dfdl-wg-bounces@ogf.org I don't know that we ever talked about this. Most schema constructs support short form <xs:element ... dfdl:encoding="utf-8" /> Does the xs:schema itself support short form for the "default" format properties? <xs:schema xmlns:xs="...." dfdl:encoding="utf-8"> ... </xs:schema> -- Mike Beckerle | OGF DFDL WG Co-Chair Tel: 781-330-0412 -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg -- dfdl-wg mailing list dfdl-wg@ogf.org http://www.ogf.org/mailman/listinfo/dfdl-wg 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
participants (3)
-
Mike Beckerle
-
Steve Hanson
-
Suman Kalia