I have a form that is bound to a schema that has a definition like this:
<xsd:attribute name="fileName" type="xsd:string" use="optional"/>
<xsd:attribute name="mimeType" type="xsd:string" use="optional"/>
The problem is that when the data is exported using Acrobat XI's Export Data (as XML) option, the attributes (which are not bound), are included in the output, i.e.
<FileValue fileName="" mimeType=""/>
Which causes issue when validating the schema, using XMLSpy. The output I expect (and need is this):
Is there a way to accomplish this?
I asked the same question of John Brinkman in his FormFeed blog under his article of Null Data Handling . It's a great shame the comments are no longer visible on the blog as there was a great deal of useful information but he was not aware of a way of excluding null content in an attribute, so I would assume there is not one.
I would suggest investigating an XSLT assigned in the Transform Outgoing Data option of your Data Connection. I ended up handling the attributes on the server before XSD validation as I thought at the time that would allow me to perform any other hacks that might be needed, but the XSLT would be easier and more self contained.