You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2022/12/05 19:40:00 UTC

[jira] [Reopened] (DAFFODIL-2750) Add option to encode/decode EXI files

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

Dave Thompson reopened DAFFODIL-2750:
-------------------------------------
      Assignee: Josh Adams

Verified the specified commit (commit 06701b1b833cc24159608e5315808dcb89c69771) is included in the latest pull from the daffodil repository.

Verified, via review, changes and files identified in the commit comment were implemented.

Verified the affected daffodil subproject sbt test suite executed successfully including the added EXI encode/decode tests. However, even though the new test passed end error was displayed in the output.  

Ran the daffodil exi and then the daffodil unparse -I exisa commands on multiple nightly xml infoset test files and compared the unparsed files to the original source file and all matched.

Although the EXI encode/decode functionality is working as expected processing actual xml infoset files, reopening the ticket. Need to determine what/where is causing the below error and the resolution.

Error displayed sbt daffodil-cli/it:test:

[info] Test run org.apache.daffodil.tunables.TestCLITunables finished: 0 failed, 0 ignored, 15 total, 2.178s
[Fatal Error] :1:1: Content is not allowed in prolog.
java.lang.IllegalArgumentException: Not a valid Unicode code point: 0xD139F9B1
        at java.base/java.lang.Character.toChars(Character.java:9218)
    at java.base/java.lang.AbstractStringBuilder.appendCodePoint(AbstractStringBuilder.java:949)
    at java.base/java.lang.StringBuilder.appendCodePoint(StringBuilder.java:276)
    at com.siemens.ct.exi.core.io.channel.AbstractDecoderChannel.decodeStringOnlySupplementaryCodePoints(AbstractDecoderChannel.java:111)
    at com.siemens.ct.exi.core.io.channel.AbstractDecoderChannel.decodeStringOnly(AbstractDecoderChannel.java:89)
    at com.siemens.ct.exi.core.coder.AbstractEXIBodyDecoder.decodeLocalName(AbstractEXIBodyDecoder.java:170)
    at com.siemens.ct.exi.core.coder.AbstractEXIBodyDecoder.decodeQName(AbstractEXIBodyDecoder.java:133)
    at com.siemens.ct.exi.core.coder.AbstractEXIBodyDecoder.decodeStartElementGenericStructure(AbstractEXIBodyDecoder.java:484)
    at com.siemens.ct.exi.core.coder.EXIBodyDecoderInOrder.decodeStartElement(EXIBodyDecoderInOrder.java:126)
    at com.siemens.ct.exi.main.api.sax.SAXDecoder.parseEXIEvents(SAXDecoder.java:313)
    at com.siemens.ct.exi.main.api.sax.SAXDecoder.parse(SAXDecoder.java:250)
    at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:190)
    at net.sf.saxon.event.Sender.send(Sender.java:105)
    at net.sf.saxon.jaxp.IdentityTransformer.transform(IdentityTransformer.java:364)
    at org.apache.daffodil.Main$.runIgnoreExceptions(Main.scala:1304)
    at org.apache.daffodil.Main$.run(Main.scala:1429)
    at org.apache.daffodil.CLI.Util$CLIThread.run(Util.scala:281)
Error 
  SXXP0003  org.xml.sax.SAXException: EXI No valid EXI document according distinguishing bits
com.siemens.ct.exi.core.exceptions.EXIException: No valid EXI document according
  distinguishing bits. Caused by org.xml.sax.SAXException: EXI No valid EXI document
  according distinguishing bits. Caused by com.siemens.ct.exi.core.exceptions.EXIException:
  No valid EXI document according distinguishing bits
[info] Test run org.apache.daffodil.saving.TestCLIEncodeDecodeEXI started
[info] Test run org.apache.daffodil.saving.TestCLIEncodeDecodeEXI finished: 0 failed, 0 ignored, 6 total, 0.35s

> Add option to encode/decode EXI files
> -------------------------------------
>
>                 Key: DAFFODIL-2750
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2750
>             Project: Daffodil
>          Issue Type: New Feature
>          Components: CLI
>    Affects Versions: 3.4.0
>            Reporter: Josh Adams
>            Assignee: Josh Adams
>            Priority: Major
>             Fix For: 3.5.0
>
>
> It is rather cumbersome to encode/decode schema aware EXI files as they need access to the Daffodil XML resolver in order to import/include schemas correctly.  Having a simple:
> "daffodil encodeEXI -s /path/to/schema /path/to/file.xml"
> to convert an XML file to an EXI file will be very helpful for testing.  A decodeEXI command would also be added.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)