Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

XML namespace in xml converted pdf

Avatar

Level 2

Hello everyone

I have a problem when converting pdf's in xml. Everytime when I convert a PDF(either with Acrobat or with mailing the file as XML) in XML the date fields always in middle shows the xml namespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" . We are using these xml's to transfer data to an accounting software but the software recognizes the xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" as an error and because of that the data couldn't be uploaded. We created the PDF using a xsd scheme made in the accounting software. Is there a way to get rid of xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" showing in the date fields.

I appreciate every possible help

4 Replies

Avatar

Level 10

Hi,

It sounds like you have the nillable="true" attribute in you XSD for the date field.

If you XSD looks like;

<xs:element name="Date1" type="xs:date" nillable="true"/>

Then you will get the following when the field Date1 is bound to is left blank.

<Date1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>

This is the correct behaviour, so I am either not understanding the problem or there is a bug in the accounting software you are using.

Maybe you could try replacing the nullable="true" with a minOccurs="0".  This will mean the element will not appear in the XML at all.

Regards

Bruce

Avatar

Level 2

Thank you for your reply

We changed the xsd scheme but sadly an another problem has appeared. When I try to load the modified xsd scheme, the LiveCycle Designer shows an error message: "Schema can not be loaded. Make sure that the path is correct and the file is a valid XML Schema file." Can I somehow send the xsd file as an attachment or somehow embed it in a post? The editor on this forum doesn't have an insert file or embed a file option.

Best regards

Ivica

Avatar

Level 10

Hi Ivica,

You can upload your xsd file to any file sharing site, acrobat.com, google.doc, etc and then add a link to it in this thread.

Happy to have a look.

Regards

Bruce

Avatar

Level 2

Thank you but I already found where the problem was. Some rows already had minOccurs="0" and because of that an error message showed up. Your first post gave me the solution that I was searching for and I am very thankful. Today we are going to test the PDF Form.

Best regards

Ivica