John Nitao | 11 Jan 10:36

question regarding namespaces in nuxeo XForms library


Hi Bogdan,

I downloaded the nuxeo XForms Java libray and
the model instance doesn't appear to support namespaces (??).

I had a tag called ft:item in the model instance and I get a parse
error (see end of email).  I think the software thinks that
it is an xforms tag (?).

The following is my XForms instance:

<instance>
                <document xmlns:ft="http://www.llnl.gov/xforms-test/1.0">

                        <metadata>
                                <title>My default title</title>
                                <mdate/>
                                <author>me</author>
                                <description>
                                This is the default description
                                </description>
                                <language>fr</language>
                                <ctype>plain</ctype>
                       </metadata>

      <ft:item> E </ft:item>

                        <content/>
                </document>
        </instance>

I only get the error if I set the instance using

form.getModel().setInstance(src)

There  is no error in the XForms file
that has the same instance.

Also, the XForms UI's appear to ignore namespaces prefixes
with respect to path references to model instance elements.

                  John Nitao

1635 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: document, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1636 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: metadata, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1636 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: title, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1636 [main] DEBUG org.nuxeo.xforms.xml.XParser  - endElement: title
1636 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: mdate, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1636 [main] DEBUG org.nuxeo.xforms.xml.XParser  - endElement: mdate
1637 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: author, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1637 [main] DEBUG org.nuxeo.xforms.xml.XParser  - endElement: author
1637 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: description, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1638 [main] DEBUG org.nuxeo.xforms.xml.XParser  - endElement: description
1639 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: language, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1639 [main] DEBUG org.nuxeo.xforms.xml.XParser  - endElement: language
1639 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: ctype, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
1639 [main] DEBUG org.nuxeo.xforms.xml.XParser  - endElement: ctype
1639 [main] DEBUG org.nuxeo.xforms.xml.XParser  - endElement: metadata
1639 [main] DEBUG org.nuxeo.xforms.xml.XParser  - startElement: ft:item, attributes: org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy <at> 13d93f4
org.nuxeo.xforms.xml.XParserException: Parse failed

Gmane