[jira] [Assigned] (DAFFODIL-2036) poor diagnostic - choice with sequences as branches with all optional content.

2019-01-22 Thread Josh Adams (JIRA)
[ https://issues.apache.org/jira/browse/DAFFODIL-2036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josh Adams reassigned DAFFODIL-2036: Assignee: Josh Adams > poor diagnostic - choice with sequences as branches with all opt

[GitHub] jadams-tresys commented on a change in pull request #169: Fix incorrect line numbers and ensure XML errors include line numbers

2019-01-22 Thread GitBox
jadams-tresys commented on a change in pull request #169: Fix incorrect line numbers and ensure XML errors include line numbers URL: https://github.com/apache/incubator-daffodil/pull/169#discussion_r249933776 ## File path: daffodil-lib/src/main/scala/org/apache/daffodil/xml/Daffodi

[GitHub] stevedlawrence opened a new pull request #169: Fix incorrect line numbers and ensure XML errors include line numbers

2019-01-22 Thread GitBox
stevedlawrence opened a new pull request #169: Fix incorrect line numbers and ensure XML errors include line numbers URL: https://github.com/apache/incubator-daffodil/pull/169 - A bug in scala-xml caused line numbers to be reset to zero after parsing CDATA and processing instructions.

Re: How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Christofer Dutz
Will try that first, first thing tomorrow. However I could swear that I had it exactly that way and it didn't work ... Thanks for your help. Chris Outlook für Android herunterladen From: Steve Lawrence Sent: Tuesday, January 22, 2019 6:44

Re: How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Christofer Dutz
Thinking of it a bit more: I initially wanted to model each protocol layer separately in order to be able to re-use layers. But till now I haven't encountered a single industry protocol utilizing the same protocol twice. So I'm thinking of joining the three parts (or at least the lower two) into

Re: How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Steve Lawrence
Yep, I think hexBinay with dfdl:lengthKind="delimited" should work for your case. I've modified the userData element to look like this: This will cause the userData field to consume all data until the end of the input. Note that delimited hexBinary is treated like string data, so the encoding

Re: How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Christofer Dutz
Hi Steve, The code is in the plc4x repo I posted several times now. Unfortunately I'm sitting in a train without my laptop. It's the COTP protocol. There's a matching tdml test with commented out binary payload. That's what I'm trying to read. Could probably post the links some time this eveni

[jira] [Assigned] (DAFFODIL-1476) Line numbers in error messages off by size of comments above

2019-01-22 Thread Steve Lawrence (JIRA)
[ https://issues.apache.org/jira/browse/DAFFODIL-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Lawrence reassigned DAFFODIL-1476: Assignee: Steve Lawrence > Line numbers in error messages off by size of commen

Re: How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Steve Lawrence
There isn't a concept of a global length of input since some inputs could be streaming and so we don't actually know the length until the end of data is reached. I guess it isn't clear to me what your data looks like. I /think/ delimited hexBinary should work. If the parent element does not have a

[jira] [Created] (DAFFODIL-2056) Implicit expression conversion from xs:string to xs:hexBinary causes exception

2019-01-22 Thread Steve Lawrence (JIRA)
Steve Lawrence created DAFFODIL-2056: Summary: Implicit expression conversion from xs:string to xs:hexBinary causes exception Key: DAFFODIL-2056 URL: https://issues.apache.org/jira/browse/DAFFODIL-2056

Re: How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Christofer Dutz
Hi Steve, well the problem is that I don't have the parent length in the current context. Without it, it doesn't seem to work. If there was some sort of global variable providing the total length of the entire input, that would be awesome. As I mentioned, the length information in in the surrou

Re: How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Steve Lawrence
Correct, lengthKind="endOfParent" has not bee implemented yet. As an alternative that we do support, you should be able to use dfdl:lengthKind="delimited" for the hexBinary user data. In this case, there's no delimiter, but parent length sort of acts like one. For example:

[GitHub] jadams-tresys commented on a change in pull request #168: Keep line/column info for Daffodil tests

2019-01-22 Thread GitBox
jadams-tresys commented on a change in pull request #168: Keep line/column info for Daffodil tests URL: https://github.com/apache/incubator-daffodil/pull/168#discussion_r249801959 ## File path: daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala ##

[GitHub] jadams-tresys commented on a change in pull request #168: Keep line/column info for Daffodil tests

2019-01-22 Thread GitBox
jadams-tresys commented on a change in pull request #168: Keep line/column info for Daffodil tests URL: https://github.com/apache/incubator-daffodil/pull/168#discussion_r249798609 ## File path: daffodil-lib/src/main/scala/org/apache/daffodil/xml/DaffodilConstructingLoader.scala ##

Re: UnitTesting with Daffodil in Maven & Java project

2019-01-22 Thread Steve Lawrence
We would definitely appreciate a write-up on how to integrate DFDL testing in a maven project. I think this would make sense to go on our website. We probably need a "How to Test with Daffodil" page or something that can talk about various ways to test like with CLI, the Standard Project Layout and

[GitHub] stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests

2019-01-22 Thread GitBox
stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests URL: https://github.com/apache/incubator-daffodil/pull/168#discussion_r249782726 ## File path: daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala ##

[GitHub] stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests

2019-01-22 Thread GitBox
stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests URL: https://github.com/apache/incubator-daffodil/pull/168#discussion_r249777949 ## File path: daffodil-lib/src/main/scala/org/apache/daffodil/xml/DaffodilConstructingLoader.scala #

[GitHub] stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests

2019-01-22 Thread GitBox
stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests URL: https://github.com/apache/incubator-daffodil/pull/168#discussion_r249778945 ## File path: daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala ##

[GitHub] stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests

2019-01-22 Thread GitBox
stevedlawrence commented on a change in pull request #168: Keep line/column info for Daffodil tests URL: https://github.com/apache/incubator-daffodil/pull/168#discussion_r249779770 ## File path: daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala ##

How to achieve lengthKind=”endOfParent” without using endOfParent?

2019-01-22 Thread Christofer Dutz
Hi all, I am stuck with a little problem … I am reading a packet, which is usually contained inside another. Therefore it doesn’t provide any means of providing it’s length. So the packet is just a small header + binary data … now I want to read “all the rest” after the header into a field “use