Hi Mike,

Thanks for the pointer.

If I understand correctly, in my DFDL schema I can specify that a string is 
terminated by an illegal XML character such as a NULL character (hex 0) by 
creating an XML character entity with a hex value in the Private Use Area: E000 
+ 0 = E000 ... then create the XML character entity: 

Then I can use the NULL character in my DFDL schema:

<xs:element name="label" type="xs:string" dfdl:terminator="&#xE000;" />

I created an input string that is null-terminated:

[cid:[email protected]]
Notice that the last byte is hex 00, the NULL character.

Here is my DFDL schema:

<xs:element name="input">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="string" type="xs:string" 
dfdl:terminator="&#xE000;" />
        </xs:sequence>
    </xs:complexType>
</xs:element>
When I parse the input using my DFDL schema, I get this error message:

Parse Error: Terminator '?' not found.

What am I doing wrong, please?

/Roger

From: Beckerle, Mike <[email protected]>
Sent: Wednesday, January 16, 2019 11:43 AM
To: [email protected]
Subject: [EXT] Re: DFDL infoset allows characters the XML infoset doesn't ... 
how can that be?


See section on XML Illegal characters on this page:



https://daffodil.apache.org/infoset/





________________________________
From: Costello, Roger L. <[email protected]<mailto:[email protected]>>
Sent: Wednesday, January 16, 2019 11:15:50 AM
To: [email protected]<mailto:[email protected]>
Subject: DFDL infoset allows characters the XML infoset doesn't ... how can 
that be?


Hello DFDL community,



Someone told me this:



DFDL's infoset allows characters

the XML infoset doesn't.



What characters?

How can it be? After all, well-formed XML is generated. And, the DFDL schema is 
well-formed XML. Right?



/Roger

Reply via email to