You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2022/01/25 16:48:00 UTC

[jira] [Commented] (DAFFODIL-2633) Unexplained behavior for documentPart type byte

    [ https://issues.apache.org/jira/browse/DAFFODIL-2633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481952#comment-17481952 ] 

Steve Lawrence commented on DAFFODIL-2633:
------------------------------------------

Looks like the test you mentioned has this as the document:

{code:xml}
    <document>
      <documentPart type="byte">02 01</documentPart>
      <documentPart type="text" encoding="iso-8859-1">A;</documentPart>
    </document>
{code}

I think the 4 probably came from the 'A' character from the documentPart type="text"? If we replace the 02 01, which just 2, then the TDML runner will append the bytes from "A;" (which is 0x41 3B) to the 0x2 nibble, so you'd end up with 0x24 13 b, and now the first byte is the 0x24 that you're seeing?

Definitely confusing, but I think the correct behavior if we want to allow nibbles.

> Unexplained behavior for documentPart type byte
> -----------------------------------------------
>
>                 Key: DAFFODIL-2633
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2633
>             Project: Daffodil
>          Issue Type: Bug
>          Components: TDML Runner
>    Affects Versions: 3.2.1
>            Reporter: Mike Beckerle
>            Priority: Major
>
>  
> <tdml:documentPart type="byte">2</tdml:documentPart>
> doesn't cause any error message, seems to create the '$' character. (which is hex 24, so the 4 comes from ???)
> Should give a diagnostic, not even number of hex digits. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)