Hi all,
I'm developing an xml schema for creating the data model of a form. I connect LC Designer-8.2ES to this schema.
In the schema I do have mutually exclusive elements implemented with a <xs:choice> element. A very comparable situation was described in this thread : http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=123 in 2007.
The problem, as related in this thread, is that only the very first element of the choice is displayed in the generated pdf and I don't know how to display all parts as a real choice. So what's the best way to let user fill in one part or the other of the choice?
Does it need to be implemented with scripting (xfa...myform.presence = visible | hidden)?
I want that only the filled element of the choice be exported from the form, the resulting xml being valid according the schema. I seems to work, but as of now, only for the first element...
BTW, what's the best document describing what parts of xml schema are usable in dynamic XFA forms? Is it 100% compatible? I've observed that the constraints in my schema are not validated in the forms. Shouldn't xml schema generate validating script in LCD? Does it apply for a subset of xml schema?
Thanks in advance,
jgrd
Views
Replies
Total Likes
<xs:choice> element in the schema always carry a single value.
For e.g If a country drop-down contains 50 country names and if the user selects one country from it, the XML data file will contain only one value.
In fact, it is the right way of doing; instead carrying 50 values.
Your problem is usually resolved using the template with data merging concept.
I mean your template will always contain 50 country names and when you data is merged with the template, the drop-down will automatically populated with the country selected be the user.
Hope you understand the core idea.
Nith
Views
Replies
Total Likes
Hi,
thank you for the answer.Unfortunately, it doesn't answer my question which is just about presentation in pdf.
Only one element of the choice, be it a complexType, will be filled in user. But I need let him choose which part! Apparently, just the first element of the choice is displayed onto the dynamic pdf and the other parts remain hidden. Can I avoid to do it programmatically in Javascript?
Thx,
jgrd
Views
Replies
Total Likes
Hi all,
finally, I understand that we cannot use "anonymous" sequences neither in LiveCycle (like this following example where person might have many email)
<xs:element name="person">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="email" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
valid instance with 3 emails :
<person xsi:noNamespaceSchemaLocation="Untitled39.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<email>String</email>
<email>String</email>
<email>String</email>
</person>
In LC Designer, element with same name (<email>) are not used AFAK. Maybe I'm wrong?
The same hands with <xs:choice> where only first choice appears in pdf although being present in LC Designer.
As for sequences, my idea is to produce <email1>, <email2>, etc. in a static schema, before connecting schema's data to LCD.
Hope someone can show up and tell it's the right way or not.
Regards
jgrd
Views
Replies
Total Likes
Hi again,
I'm replying to myself as I found a solution for anonymous sequences, thanks to a thread on
<xs:element name="person">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="email" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
shoud have been written <xs:element name="person">
<xs:complexType>
<xs:sequence >
<xs:element name="email" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
which did the trick.
jgrd
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies