You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by Nestor Fernandez <ne...@chakray.co.uk> on 2022/03/01 18:04:30 UTC

ignore unwanted elements when parsing from edi to xml

Hi team,

Is there a way to remove an unwanted element when parsing from edi to xml?

At the moment we have some edi fields which we don't want in the resulting
xml.
Obviously we are defining them in the dfdl.xsd, because otherwise the
parsing would break, so they appear in the xml.

I would assume there would be some way to ignore or skip the field, like
some dfd attribute, but can't find it. (We are using version 3.0.0)

Thank you

Re: ignore unwanted elements when parsing from edi to xml

Posted by Mike Beckerle <mb...@apache.org>.
You can put them inside a hidden group, then they will be parsed/unparsed
but will not appear in the infoset XML.

You use the dfdl:hiddenGroupRef="qname of group" on an xs:sequence to put a
hidden group into use.

A public schema on github for mil-std-2045, makes extensive use of
dfdl:hiddenGroupRef to hide presence bits for optional fields.

On Tue, Mar 1, 2022 at 1:04 PM Nestor Fernandez <
nestor.fernandez@chakray.co.uk> wrote:

> Hi team,
>
> Is there a way to remove an unwanted element when parsing from edi to xml?
>
> At the moment we have some edi fields which we don't want in the resulting
> xml.
> Obviously we are defining them in the dfdl.xsd, because otherwise the
> parsing would break, so they appear in the xml.
>
> I would assume there would be some way to ignore or skip the field, like
> some dfd attribute, but can't find it. (We are using version 3.0.0)
>
> Thank you
>