- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Fri, 31 Oct 2014 11:57:03 -0700
- To: Joern Turner <joern.turner@betterform.de>
- Cc: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
>> 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
Received on Friday, 31 October 2014 18:57:51 UTC