Custom XSD model in form-builder

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom XSD model in form-builder

falba48
Hello,

The form builder can generate an instance based on its own XSD, which
already has its own data structure defined.

Is it possible to make the form builder work with the uploaded XSD model?
Will it generate the XML with the target namespace and the structure
provided by the XSD?

In various tests I have not been able to make it work with the complexTypes.

Greetings and thanks.


This is the XSD structure we use:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="www.xxx.com"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="www.xxx.com"
       
        elementFormDefault="qualified"
        attributeFormDefault="unqualified" >

       

       
        <xsd:simpleType name="StringNoBuit">
                <xsd:restriction base="xsd:string">
                        <xsd:minLength value="1"/>
                </xsd:restriction>
        </xsd:simpleType>

       
        <xsd:complexType name="Contingut">
                <xsd:sequence>
                        <xsd:element name="nom" type="xsd:string" minOccurs="0" maxOccurs="1" />
                        <xsd:element name="cognoms" type="tns:StringNoBuit" minOccurs="1"
maxOccurs="1" />
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="Document">
                <xsd:sequence>
                        <xsd:element name="contingut" type="tns:Contingut" minOccurs="1"
maxOccurs="1"/>
                       
                </xsd:sequence>
        </xsd:complexType>

       
        <xsd:element name="document" type="tns:Document"/>

</xsd:schema>

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1590054520458-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Custom XSD model in form-builder

Alessandro  Vernet
Administrator
Hi,

You can have Orbeon Forms generate a schema for a form you created in Form
Builder, but the structure of the XML document used to capture data is
strictly determined by the structure of your form in Form Builder. You can't
have a different structure, and "map" fields to elements in the XML
document. If you need a different structure, you'll want to do the mapping
from the XML document produced by Orbeon Forms to the XML document you need
in a service Orbeon Forms can call when users submit the form, this for
instance with XSLT.

And you'll let me know if you were looking for something different, or I
misunderstand your question.

https://doc.orbeon.com/form-runner/api/other-apis/xml-schema-generation

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1590102758389-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Custom XSD model in form-builder

falba48
In reply to this post by falba48
Thank you if you have answered my question.

The target namespace cannot be modified either, right?

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/bb5c6000-bf58-4dd0-896c-b41c9440b730%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Custom XSD model in form-builder

Alessandro  Vernet
Administrator
Correct, the elements in the produced document are always in no namespace.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1590431362681-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet