Subject: [Simple] Filtering - including attributes?

From: <[email-masked]>
Date: Fri, 2 Jun 2006 13:41:23 +0200

Hi,

I have one question about filtering and I am unable to find an answer in specifications ☹ . Could anyone help me please?

I have the following document:

<root>
  <element attr="x">
    <sub-element>value</sub-element>
  </element>
</root>

Suppose all elements and attributes in that document are optional. What is the correct result of filtering by the following filter?

<filter-set xmlns="...">
  <filter>
    <what>
      <include type="xpath">/root/element</include>
    </what>
  </filter>
</filter-set>

Is it the whole source document? Or, is it "<root><element/></root>" only? What about the 'attr' attribute? Is it included too?

Thanks, in advance.

Best regards,

Michal Burda
_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Hisham Khartabil <[email-masked]>
Date: Wed, 14 Jun 2006 16:18:32 +0200

On Jun 2, 2006, at 1:41 PM, <[email-masked]> wrote:

> Hi,
>
> I have one question about filtering and I am unable to find an answer 
> in specifications ☹ . Could anyone help me please?
>
> Suppose all elements and attributes in that document are optional. 
> What is the correct result of filtering by the following filter?
>
> <filter-set xmlns="...">
>   <filter>
>     <what>
> Is it the whole source document? Or, is it "<root><element/></root>" 
> only? What about the 'attr' attribute? Is it included too?

it is "<root><element/></root>" only unless the sub-element is a 
mandatory element. The attribute is only included if the it is 
mandatory.

Hisham