[DFDL-WG] [dfdl] initiatedContent w/o initiators

Garriss Jr., James P. jgarriss at mitre.org
Fri May 31 08:46:46 EDT 2013


Thanks for the help, Mike.  I understand what you want me to do, but not why.  After all, the code I have works great on all the test data I've thrown at it.

Please explain how this is different from the schema code I have and why it is better.  TIA.

From: Mike Beckerle [mailto:mbeckerle.dfdl at gmail.com]
Sent: Friday, May 31, 2013 1:33 AM
To: Garriss Jr., James P.
Subject: Re: [DFDL-WG] [dfdl] initiatedContent w/o initiators

You need two nested choices. Only the inner one uses initiated content.

<xsd:choice>
    <xsd:choice dfdl:initiatedContent="yes">
           <xsd:element ref="Date"/>
           <xsd:element ref="From"/>
           <xsd:element ref="MessageId"/>
            <xsd:element ref="Subject"/>
    </xsd:choice>
    <!-- all unknown and unwanted headers -->
    <xsd:sequence dfdl:hiddenGroupRef="UnwantedHeadersGroup"/>
</xsd:choice>

On Thu, May 30, 2013 at 2:49 PM, Garriss Jr., James P. <jgarriss at mitre.org<mailto:jgarriss at mitre.org>> wrote:
Spec says:

It is a schema definition error if any children have their dfdl:initiator property set to the empty string.

Does that include a sequence with a hiddenGroupRef?

For example, part of a schema for email headers is this:

                                                                        <xsd:choice dfdl:initiatedContent="yes">
                                                                                    <xsd:element ref="Date"/>
                                                                                    <xsd:element ref="From"/>
                                                                                    <xsd:element ref="MessageId"/>
                                                                                    <xsd:element ref="Subject"/>
                                                                                    <!-- all unknown and unwanted headers -->
                                                                                    <xsd:sequence dfdl:hiddenGroupRef="UnwantedHeadersGroup"/>
                                                                        </xsd:choice>

Date, From, and the other headers are all elements with initiators, but UnwantedHeadersGroup does not have an initiator (because I don't know it a priori).

Should this throw an error in a DFDL implementation?  I suspect it should, though I hope it shouldn't.

--
  dfdl-wg mailing list
  dfdl-wg at ogf.org<mailto:dfdl-wg at ogf.org>
  https://www.ogf.org/mailman/listinfo/dfdl-wg



--
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com<http://www.tresys.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130531/317c590c/attachment.html>


More information about the dfdl-wg mailing list