Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Attributes on XSD Schema Bound Form

Avatar

Avatar
Validate 10
Level 4
jnicholas330
Level 4

Likes

21 likes

Total Posts

325 posts

Correct Reply

31 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 4
jnicholas330
Level 4

Likes

21 likes

Total Posts

325 posts

Correct Reply

31 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
jnicholas330
Level 4

17-11-2016

I have a form that is bound to a schema that has a definition like this:

<xsd:complexType name="File">

        <xsd:simpleContent>

            <xsd:extension base="xsd:base64Binary">

                <xsd:attribute name="fileName" type="xsd:string" use="optional"/>

                <xsd:attribute name="mimeType" type="xsd:string" use="optional"/>

            </xsd:extension>

        </xsd:simpleContent>

    </xsd:complexType>

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):

<FileValue />

Is there a way to accomplish this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

21-11-2016

Hi,

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.

Regards

Bruce

Avatar

Avatar
Validate 10
Level 4
jnicholas330
Level 4

Likes

21 likes

Total Posts

325 posts

Correct Reply

31 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 4
jnicholas330
Level 4

Likes

21 likes

Total Posts

325 posts

Correct Reply

31 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
jnicholas330
Level 4

25-11-2016

Bruce,

I found the old thread here:

Null Data Handling « FormFeed

I'll have to look at a way of relaxing the schema to accommodate this.

J