You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2020/07/10 01:10:00 UTC

[jira] [Updated] (DAFFODIL-2363) pattern facet can't use  notation. Makes validating NUL very hard.

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

Mike Beckerle updated DAFFODIL-2363:
------------------------------------
    Description: 
See test_nulPattern1. 

This bug is a real pain in the neck. 

I want to capture NUL padding regions and insure they are all NUL. 

These come through to XML as These U+E000 characters. I need to insure that the string contains only those.

So I'd like to use a 
```
<xs:simpleType name="allNULStringType>
  <xs:restriction base="xs:string">
     <xs:pattern value="&amp;#xE000;*"/>
  </xs:restriction>
</xs:simpleType>
```
I consider this data well-formed (should parse) even if other bytes are there that aren't NUL, but such data is invalid. So I want the facet to check for all NUL chars (or these E000 things that Daffodil puts in XML because XML can't contain actual NUL chars).

The test fails with 
```
org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) Validation errors found where none were expected by the test case.
Validation Error: ex:foo failed facet checks due to: facet pattern(s): *
```
If github does the right thing that pattern will look like the E000 box char and *. 


  was:

See test_nulPattern1. 

This bug is a real pain in the neck. 

I want to capture NUL padding regions and insure they are all NUL. 

These come through to XML as These U+E000 characters. I need to insure that the string contains only those.

So I'd like to use a 
```
<xs:simpleType name="allNULStringType>
  <xs:restriction base="xs:string">
     <xs:pattern value="&#xE000;*"/>
  </xs:restriction>
</xs:simpleType>
```
I consider this data well-formed (should parse) even if other bytes are there that aren't NUL, but such data is invalid. So I want the facet to check for all NUL chars (or these E000 things that Daffodil puts in XML because XML can't contain actual NUL chars).

The test fails with 
```
org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) Validation errors found where none were expected by the test case.
Validation Error: ex:foo failed facet checks due to: facet pattern(s): *
```
If github does the right thing that pattern will look like the E000 box char and *. 



> pattern facet can't use &#xE000; notation. Makes validating NUL very hard. 
> ---------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2363
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2363
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 2.7.0
>            Reporter: Mike Beckerle
>            Priority: Major
>             Fix For: 3.0.0
>
>
> See test_nulPattern1. 
> This bug is a real pain in the neck. 
> I want to capture NUL padding regions and insure they are all NUL. 
> These come through to XML as These U+E000 characters. I need to insure that the string contains only those.
> So I'd like to use a 
> ```
> <xs:simpleType name="allNULStringType>
>   <xs:restriction base="xs:string">
>      <xs:pattern value="&amp;#xE000;*"/>
>   </xs:restriction>
> </xs:simpleType>
> ```
> I consider this data well-formed (should parse) even if other bytes are there that aren't NUL, but such data is invalid. So I want the facet to check for all NUL chars (or these E000 things that Daffodil puts in XML because XML can't contain actual NUL chars).
> The test fails with 
> ```
> org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) Validation errors found where none were expected by the test case.
> Validation Error: ex:foo failed facet checks due to: facet pattern(s): *
> ```
> If github does the right thing that pattern will look like the E000 box char and *. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)