You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by "Costello, Roger L." <co...@mitre.org> on 2019/01/11 19:17:46 UTC
Alternative to referencing escapeScheme at each element declaration?
Hello DFDL community,
Below is a slide that shows a DFDL schema. I have two elements that reference escapeScheme. Someone recommended this: I'd suggest the escapeSchemeRef="Backslash" go in the dfdl:format block at top of file. I don't know what that means. How do I implement that recommendation? /Roger
[cid:image001.png@01D4A9B8.6B627C00]
Re: Alternative to referencing escapeScheme at each element
declaration?
Posted by Steve Lawrence <sl...@apache.org>.
They're just saying that you can remove the dfdl:escapeSchemeRef from
the xs:elements and put it in the dfdl:format tag instead, e.g.:
<dfdl:format ref="default-properties" escapeSchemeRef="Backslash" />
Note that this will apply the escapeSchemRef to every element, which you
may or may not want depending on the file format. Another approach is to
define a new simple type that has the property defined, e.g.:
<xs:simpleType name="escapedString" dfdl:escapeSchemeRef="Backslash">
<xs:restriction base="xs:string" />
</xs:simpelType>
...
<xs:element name="label" type="escapedString" />
...
On 1/11/19 2:17 PM, Costello, Roger L. wrote:
> Hello DFDL community,
>
> Below is a slide that shows a DFDL schema. I have two elements that reference
> escapeScheme. Someone recommended this: /I'd suggest the
> escapeSchemeRef="Backslash" go in the dfdl:format block at top of file/. I don’t
> know what that means. How do I implement that recommendation? /Roger
>