Re: Review of section 7

(Resending from another email address, sorry about the duplicate.)

>> I would like to know if definition of includenamespaceprefixes attribute (7.1
>> The submission Element) is still relevant for others.
>>
>> XSLTForms is currently acting as if this attribute is, by default, present but
>> empty: only "used" namespaces are declared.
>>
>>>From my point of view, it is more author friendly not having to always add
>> includenamespaceprefixes="" because XForms namespace declaration sounds useless
>> in submissions. In XSLT, the stylesheet namespace is not present by default in
>> the resulting serialization.
>
> Speaking for betterFORM i agree with Alain - putting the XForms
> namespace on instances on submission is rather confusing users in our
> experience.

It's not that the submission *puts* those namespaces when serializing,
that the data model *already contains* those namespaces in scope and
therefore they get serialized.

It seems wrong to me to handle this at submission time if the problem
to be solved is to fixup undesired namespaces due to the inlining of
the data model definition within <xf:instance>.

Instead, I think it should be done at the time the data model is created.

Also note that this problem does not exist if the instance is external, as in:

  <xf:instance src="my-instance.xml"/>

In our implementation we support `xxf:exclude-result-prefixes` (based
on XSLT's `exclude-result-prefixes` attribute - reusing that name
might not have been a great choice). You place that attribute on
<xf:instance>:

    <xf:instance id="fr-service-request-instance"
xxf:exclude-result-prefixes="#all">
      <request>...</request>
    </xf:instance>

This also puts the attribute which control the data model closer from
the data itself, like when one uses xmlns="":

    <xf:instance id="fr-service-request-instance" xmlns="">
      <request>...</request>
    </xf:instance>

or:

    <xf:instance id="fr-service-request-instance">
      <request xmlns="">...</request>
    </xf:instance>

We could support two attributes on <xf:instance>:

- `includenamespaceprefixes`
- `excludenamespaceprefixes`

These two attributes can also be supported on <xf:submission> and
operate at the time of serialization, if need be. But if the data
model is clean, the need for the attributes at submission time is
smaller.

You would need to remember to use the `excludenamespaceprefixes`
attribute as needed when declaring inline instances:

    <xf:instance id="fr-service-request-instance"
excludenamespaceprefixes ="#all">
      <request>...</request>
    </xf:instance>


-Erik

On Wed, Oct 22, 2014 at 9:41 AM, Joern Turner
<joern.turner@betterform.de> wrote:
> Am 22.10.14 15:56, schrieb alain.couthures@agencexml.com:
>> All,
>>
>> I would like to know if definition of includenamespaceprefixes attribute (7.1
>> The submission Element) is still relevant for others.
>>
>> XSLTForms is currently acting as if this attribute is, by default, present but
>> empty: only "used" namespaces are declared.
>>
>>>From my point of view, it is more author friendly not having to always add
>> includenamespaceprefixes="" because XForms namespace declaration sounds useless
>> in submissions. In XSLT, the stylesheet namespace is not present by default in
>> the resulting serialization.
>
> Speaking for betterFORM i agree with Alain - putting the XForms
> namespace on instances on submission is rather confusing users in our
> experience.
>
> my 2 cents,
>
> Joern
>
>>
>> I have not seen includenamespaceprefixes used everywhere in the Test Suite, am I
>> wrong?
>>
>> Thanks!
>>
>> --Alain
>>
>
>

Received on Friday, 31 October 2014 19:01:33 UTC