Re: Attributes and nonrelevant="empty" on submission

The spec says:

> non-relevant nodes are serialized as empty values

If an element is non-relevant, its attributes are also non-relevant. So the
text content of the element must be empty, and the attribute values must be
empty as well. So:

    <instance>
      <data xmlns="">
         <one value="1">uno</one>
         <two value=""/>
      <data>
  </instance>

That appears to match what the text says, but it's also what I would like.

-Erik

On Mon, Apr 13, 2020 at 7:44 AM Steven Pemberton <steven.pemberton@cwi.nl>
wrote:

> On Sun, 12 Apr 2020 22:35:02 +0200, Steven Pemberton
> <steven.pemberton@cwi.nl> wrote:
>
> > I'm writing tests for submission, and I've come to a case that I don't
> > know the answer to:
> >
> >   <instance>
> >       <data xmlns="">
> >          <one value="1">uno</one>
> >          <two value="2">due</two>
> >       <data>
> >   </instance>
> >   <bind ref="two" relevant="false()"/>
> >   <submission resource="data.xml" nonrelevant="empty" method="put"/>
> >
> > Does the data get serialized as
> >
> >   <data xmlns="">
> >      <one value="1">uno</one>
> >      <two/>
> >   </data>
> >
> > or as
> >
> >   <data xmlns="">
> >      <one value="1">uno</one>
> >      <two value="2"/>
> >   </data>
>
> or as
>
>     <data xmlns="">
>        <one value="1">uno</one>
>        <two value=""/>
>     </data>
>
> >
> > ?
> >
> > Steven
>
>

Received on Monday, 13 April 2020 18:10:23 UTC