You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2019/04/23 03:51:00 UTC

[jira] [Assigned] (DAFFODIL-2110) Cannot change bitorder mid schema

     [ https://issues.apache.org/jira/browse/DAFFODIL-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Beckerle reassigned DAFFODIL-2110:
------------------------------------------

    Assignee: Michael Beckerle  (was: Brandon Sloane)

> Cannot change bitorder mid schema
> ---------------------------------
>
>                 Key: DAFFODIL-2110
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2110
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 2.4.0
>            Reporter: Brandon Sloane
>            Assignee: Michael Beckerle
>            Priority: Major
>         Attachments: BitOrder.tdml
>
>
> Setting the bitOrder in the middle of a schema appears to have no effect.
> Consider the following schema:
> {quote}<xs:element name="changeOnSequence" dfdl:lengthKind='implicit'>
>  <xs:complexType>
>  <xs:sequence>
>  <xs:sequence dfdl:bitOrder="mostSignificantBitFirst">
>  <xs:element name="A" type="xs:unsignedInt" dfdl:length="8"/>
>  <xs:element name="B" type="xs:unsignedInt" dfdl:length="8"/>
>  </xs:sequence>
>  <xs:sequence dfdl:bitOrder="leastSignificantBitFirst" dfdl:byteOrder="littleEndian">
>  <xs:element name="C" type="xs:unsignedInt" dfdl:length="8" dfdl:bitOrder="leastSignificantBitFirst" dfdl:byteOrder="littleEndian"/>
>  <xs:element name="D" type="xs:unsignedInt" dfdl:length="8"/>
>  </xs:sequence>
>  </xs:sequence>
>  </xs:complexType>
>  </xs:element>
> {quote}
> With the following test:
> {quote}<tdml:parserTestCase name="bitOrderChangeOnSequence"
>  root="changeOnSequence" model="s6" description="Tests changing bitOrder when on a byte boundary.">
>  <document xmlns="http://www.ibm.com/xmlns/dfdl/testData">
>  <documentPart type="bits">
>  0000 0001
>  0000 0001
>  1000 0000
>  1000 0000
>  </documentPart>
>  </document>
>  <tdml:infoset>
>  <tdml:dfdlInfoset xmlns:xs="http://www.w3.org/2001/XMLSchema"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://example.com">
>  <changeOnSequence>
>  <A>1</A>
>  <B>1</B>
>  <C>1</C>
>  <D>1</D>
>  </changeOnSequence>
>  </tdml:dfdlInfoset>
>  </tdml:infoset>
>  </tdml:parserTestCase>
> {quote}
> (both snippets are in attached tdml as test name bitOrderChangeOnSequence. The attached TDML is an uncommited modified version of section05/simple_types/BitOrder.tdml )
> The actual result of parsing is:
> {quote}<changeOnSequence>
> <A>1</A>
> <B>1</B>
> <C>128</C>
> <D>128</D>
> </changeOnSequence>
> {quote}
> Note that the above schema attempts to change the bit order in 2 different ways:
> 1) On a sequence, and
> 2) On an element itself.
> Neither approach has any results.
> A possibly related issue is that ommiting the dfdl:byteOrder="littleEndian" on the xs:element results in an SDE, despite the fact that such is set on the enclosing sequence.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)